Login   Register  
PHP Classes
elePHPant
Icontem

Cache output and objects: Cache the output of PHP scripts in files

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-03-28 (7 years ago) RSS 2.0 feedStarStarStarStar 68%Total: 3,445 All time: 914 This week: 1,518Down
Version License PHP version Categories  
cache 1.0Custom (specified in a ...4.2Cache, Templates
Description Author  

This class can be used to cache the output of PHP scripts in files.

It checks if a given cache file exists and is updated. If it is updated, it outputs the cached content. Otherwise it starts capturing the output of the current script.

When the script is done outputting the content to be cached, it should call the class again to check the cache. Then the class updates the captured output.

The class may cache nested scripts that output several blocks of content stored in different cached files and with eventually different expiration times.

This package also comes with a plug-in to cache output of pages generated with Smarty templates.

The class may also cache the serialized values of objects and other types of variables.

Picture of Dragan Bo?njak
Name: Dragan Bo?njak <contact>
Classes: 2 packages by
Country: Croatia Croatia
Age: 31
All time rank: 6221 in Croatia Croatia
Week rank: 1151 Down2 in Croatia Croatia Down

  Files folder image Files  
File Role Description
Files folder imagesmarty (2 files)
Plain text file cache.php Class Main file
Accessible without login Plain text file test_01_hello_world.php Example Hello World
Accessible without login Plain text file test_02_nested.php Example Example of nested blocks
Accessible without login Plain text file test_03_objects.php Example Caching objects
Accessible without login Plain text file test_04_quotes.php Example Test of serialization with special characters
Accessible without login Plain text file test_05_benchmark.php Example Benchmark example
Accessible without login Plain text file test_06_smarty.php Example Smarty plugin example
Accessible without login Plain text file license.txt Lic. License file
Accessible without login Plain text file readme.txt Doc. Read me

  Files folder image Files  /  smarty  
File Role Description
  Accessible without login Plain text file block.cache.php Aux. Smarty plugin
  Accessible without login Plain text file test_06_smarty.tpl Data Templage for smarty plugin example

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,445All time:914
 This week:0This week:1,518Down
User Ratings User Comments (1)  
 All time
Utility:88%StarStarStarStarStar
Consistency:86%StarStarStarStarStar
Documentation:72%StarStarStarStar
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:302
 
does not work anymore
3 years ago (Alexander Garzon)
25%StarStar