PHP Classes

Cache File - Part File: Cache PHP script output in files

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 599 All time: 5,185 This week: 225Up
Version License PHP version Categories
cache-file-part 1.0GNU General Publi...5.0PHP 5, Files and Folders, Cache


This class can be used to cache content in files.

It can capture the current script output and store it in cache files if these do not exist already or they have already expired.

The class can just dump the contents of a cache file and exit if the cache file already exists and did not yet expire.

Picture of modbay
Name: modbay <contact>
Classes: 1 package by
Country: Lebanon Lebanon
Age: 40
All time rank: 30433 in Lebanon Lebanon
Week rank: 358 Up1 in Lebanon Lebanon Up


/** * cache class . used to cache a file or part of a file * @author Mohammad A.Baydoun <> * @copyright copyright (c) copyright 2011 * @license GNU Public Licence (GPL) */ /** * @version 1.0 support file and part file caching * @example * ***file caching*** * $cache=new cache(); * $cache->start_cache(); * place data in between example (html /php echo of your output) * $cache->end_cache(); * * * ***part file caching*** * $cache=new cache(); * $cache->start_cache($id); where $id is the part you want to cache it * place data in between example (html /php echo of your output) * $cache->end_cache(); */ /** * check the sample in order to see the class in action * please note that the folder upload should be 777; */

  Files folder image Files  
File Role Description
Files folder imageclass (1 file)
Plain text file readme.txt Doc. include some description of how to use the class
Accessible without login Plain text file sample_file_cache.php Example Example of file caching
Accessible without login Plain text file sample_nest_file_cache.php Example Caching File/Part File nested
Accessible without login Plain text file sample_part_file_cache.php Example Example of part file caching

  Files folder image Files  /  class  
File Role Description
  Plain text file cache.php Class Caching File/Part File with extra paramters for js cookie and session cases

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,185
This week:225Up