Projects / File cache class

File cache class

File cache class is a PHP Class that can cache arbitrary data in files in order to reduce the time necessary to regenerate pages or other types of data that do not change every time they are requested. It features safe locking of cache files to avoid data corruption caused by simultaneous accesses during cache file updates, portable locking schemes, and the ability to set a cache expiry date or timeout period. Cache files can store user-defined headers besides the cached data, and also standard headers used in HTTP like content-length:, date:, expires:, etag:, etc. It has been tested under Linux, SunOS and Windows.

Operating Systems

RSS Recent releases

  •  30 Apr 2009 10:04

    Release Notes: This release fixes a bug that was preventing the class from checking cache file integrity.

    •  04 Feb 2008 04:41

    Release Notes: This release fixes a bug that was preventing the reading of cache file headers longer than the default file buffering length limit.

    •  29 Apr 2004 00:10

    Release Notes: An issue with not reinitializing the headers of an outdated cache file that was making file cache refreshing fail when setting headers that were already defined in the outdated cache file were fixed. Explicit non-blocking file locking methods are now used in the updating method.

    Release Notes: This release implements a function, "updating", that determines if the cache is currently locked for update by a concurrent process, or if the cache is available for reading or updating. A simple example of usage of the class is also provided.

    Release Notes: This release can cache headers which contain special values to be used to generate the cache. These values are verified to determine if the cache is up-to-date. Several bugs have been fixed.


    Project Spotlight

    PHP Server Monitor

    A tool to monitor your servers and websites.


    Project Spotlight


    A portable archive file manager.