Login   Register  
PHP Classes
elePHPant
Icontem

secache: Store and retrieve cached values from single file

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 371 All time: 6,037 This week: 1,606Up
Version License PHP version Categories  
secache 0.1MIT/X Consortium License4.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
Age: 32
All time rank: 319036 in China China
Week rank: 1826 Up22 in China China Up
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:371All time:6,037
 This week:0This week:1,606Up