PHP Classes

secache: Store and retrieve cached values from single file

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 378 All time: 6,744 This week: 488Up
Version License PHP version Categories
secache 0.1MIT/X Consortium ...4.0Files and Folders, Cache
Description 

Author

This class can be used to store and retrieve cached values from single file.

It can store one or more keys in a single cache file.

The class can also look up for a given key and retrieve the store value.

It can lock the file during access to prevent corruption, but there is also a sub-class that can be used to access the cache file without locking it.

It can automatically clean-up the least recently used entries to free space.

Innovation Award
PHP Programming Innovation award nominee
April 2010
Number 4
Many sites use caching solutions to gain performance by storing the contents of pages in files on the first page access, thus avoiding the overhead of generating the page contents again in subsequent accesses.

Sites with many pages may need to use many cache files or directories, which in turn may lead to significant cache file access overhead.

This class implements an alternative approach by caching the contents of many pages in a single file.

Manuel Lemos
Picture of wanglei
Name: wanglei <contact>
Classes: 1 package by
Country: China China
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (3)  
File Role Description
Plain text file secache.php Class main class
Plain text file secache_no_flock.php Class without flock, low performance
Accessible without login Plain text file example.php Example write and read

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:378
This week:0
All time:6,744
This week:488Up