PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 377 All time: 6,740 This week: 621Up
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
Age: 42
All time rank: 360739 in China China
Week rank: 312 Up3 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:377
This week:0
All time:6,740
This week:621Up