PHP Classes
elePHPant
Icontem

secache: Store and retrieve cached values from single file

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-03-11 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 372 All time: 6,436 This week: 899Up
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  
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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:372
This week:0
All time:6,436
This week:899Up