Login   Register  
PHP Classes
elePHPant
Icontem

Class Cache: Caching data in files of a given folder

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of MARY Matthieu
Name: MARY Matthieu <e-mail contact>
Packages: 19 Browse all classes by MARY Matthieu Browse all classes by
Country: France, Metropolitan France, Metropolitan - PHP jobs in France, Metropolitan
Age: 35
All time rank: 231 in France, Metropolitan France, Metropolitan
Week rank: 165 Down1 in France, Metropolitan France, Metropolitan Equal


  Detailed description   Download Download .zip .tar.gz  
This class is capable of caching arbitrary data in files of a given folder.

This is meant to help reducing the time it takes to serve the same content of pages that would take a long time to generate and would slow down the access to such pages if they had to regenerated everytime when not using content caching.

The class works by checking if a cache file with a given key exists and it was not created since a longer time than the cache expiration period. If it does not exist or has expired, the data is stored in a cache file. Otherwise the data is retrieved from the cache file.

The class uses the MD5 algorithm to generate the names of the files on which the cached data is stored.

If the folder where the cache files are created does not exist, the class can create it and also store in them an empty index.html file and a .htaccess file with permissions set to deny access to the files via the Web in case you are using Apache as Web server.

The default cache expiry time is 86400 seconds. The default cache folder is the ./cache. You can change these values when the cache class object is created using the class constructor of ant time later the updateCache function.

  Classes of MARY Matthieu  >  Class Cache  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Class Cache
Base name: class_cache
Description: Caching data in files of a given folder
Version: -
PHP version: -
License: GNU General Public License (GPL)
All time users: 1499 users
All time rank: 2378
Week users: 1 user
Week rank: 1808 Up
 
  Groups   Freshmeat project   Rate classes User ratings  
  Applications   Related links   Files Files  

  Groups  
Group folder image Files and Folders Listing, accessing and manipulating files and folders View top rated classes
Group folder image Cache Classes for managing cached pages View top rated classes


  Freshmeat project  
Project record: class_cache
Popularity score: 12.57
Vitality score: 60.92

  User ratings  
There are not enough user ratings to display for this class.

  Applications that use this class  
Link Description
phplibrairies official class_cache url the url were is store the latest class_cache version
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related links  
Link Description
documentation the official url site
examples examples of use of this class

  Files folder image Files  
File Role Description
Accessible without login Plain text file CHANGELOG Data changelog file
Plain text file class_cache.php Class This class_cache file

Download Download all files: class_cache.tar.gz class_cache.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.