PHP Classes

URI Cache: Cache pages based files based on the request URI

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 467 All time: 6,038 This week: 488Up
Version License PHP version Categories
uri_cache 1.0GNU General Publi...5.0PHP 5, Files and Folders, Cache
Description 

Author

This class can be used to cache whole pages on files with names based on the request URI.

It takes the current request URI and uses MD5 to compute the name of a file that should store the cached version of the current page.

If the computed cache file does not exist, it starts capturing the output of the current script and stores it in the cache file when the script ends.

If the cache file exists, it reads the cache file contents and outputs it.

The cache file directory and the cached files lifetime are configurable parameters.

Picture of yinsee
Name: yinsee <contact>
Classes: 3 packages by
Country: Malaysia Malaysia
Age: 47
All time rank: 231110 in Malaysia Malaysia
Week rank: 180 Up1 in Malaysia Malaysia Up

  Files folder image Files (2)  
File Role Description
Plain text file class.URI_Cache.php Class class object
Accessible without login Plain text file sample1.php Example sample #1 - auto cache

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:467
This week:0
All time:6,038
This week:488Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1759