Login   Register  
PHP Classes
elePHPant
Icontem

Class: Class Cache

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of MARY Matthieu  >  Class Cache  >  Download .tar.gz .zip  >  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
Related classes: ,
Version: -
PHP version: -
License: GNU General Public License (GPL)
All time users: 1462 users
All time rank: 2219
Week users: 0 users
Week rank: 2507
Picture of MARY Matthieu
Author: MARY Matthieu <e-mail contact>
Packages: 19 Browse this author's classes Browse this author's classes
Country: France, Metropolitan France, Metropolitan - PHP jobs in France, Metropolitan
Age: 33
All time rank: 231 in France, Metropolitan France, Metropolitan
Week rank: 115 Down1 in France, Metropolitan France, Metropolitan Equal


  Detailed description  
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.

 

  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   Rate classes User ratings   Applications   Related links   Files Files  

  Freshmeat project  
Project record: class_cache
Popularity score: 10.3
Vitality score: 54.02

  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
Plain text file CHANGELOG Data changelog file
Plain text file class_cache.php Class This class_cache file

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.