PHP Metameric Cache is Available

by Hiroshi on April 4, 2013

in cache


I always wanted to create a simple cache script that should be easy to use, flexible and can take parts of webpage to store separately as cache files. Sometimes you do not need full page cache mechanism.

Lets say your requirement is to create individual cache files for multiple data sets on the same page with names that you define, then you need PHP metameric cache. Although you can create full page cache with this one but this is built to create segmental cache for any web page. Got dynamic website with heavy data to be retrieved from database or pages that require complex calculations to show results? Use this cache script to create cache for only those parts of website that need it most.

In my opinion use this script to create cache for website menu, website header, website footer and you can also store record-set from database into a cached file.

Best part about this cache is that you can name individual cached parts of website and set custom expiry time for any section that is being cached.


  • Set different expiry time for any or each cached result.
  • Create cache for specific parts of webpage or create full webpage cache.
  • Easy to integrate in and configure with any website
  • Lightweight script
  • Only connects to the database or go through PHP scripts when cache has expired or cache page does not exist
  • Set cache time easily
  • Delete selected part (file) from cache or all cache files
  • Reduce server load, processing, resources consumption and increase website loading speed making it responsive
  • Reduce database queries requests


// set custom time for cache - optional
$cachetime=48 * 3600; //48 hours
if($cached!='yes') { ?>
data or code to cache... 
<?php } include("end-cache.php"); ?>

Live Preview of PHP MetaMeric Cache
Buy PHP MetaMeric cache

Related Posts

Previous post:

Next post: