Código PHP:
<?php
// In your config file
include("php_fast_cache.php");
// This is Optional Config only. You can skip these lines.
// phpFastCache support "apc", "memcache", "memcached", "wincache" ,"files", "pdo", "mpdo" and "xcache"
// You don't need to change your code when you change your caching system. Or simple keep it auto
phpFastCache::$storage = "auto";
// End Optionals
// In your Class, Functions, PHP Pages
// try to get from Cache first.
$products = phpFastCache::get("products_page");
if($products == null) {
$products = YOUR DB QUERIES || GET_PRODUCTS_FUNCTION;
// set products in to cache in 600 seconds = 10 minutes
phpFastCache::set("products_page",$products,600);
}
foreach($products as $product) {
// Output Your Contents HERE
}
?>
Pd: éste es el link para descargar la clase: https://github.com/khoaofgod/phpfastcache