We have developed one website site. Now some user are using this site, so i plan to create server cache for some page in the site's so send some tips or ways to create simply without problem.
I am working in PHP and I think ob_start() function and ob_end_flash function will help you to create you server cache for your website.
Here is the example coding:
// Define path and name of cached file
$cachefile = 'cache/'.date('M-d-Y').'.php';
// How long to keep cache file?
$cachetime = 18000;
//Is cache file still fresh? If so, serve it.
if (file_exists($cachefile) && time() - $cachetime <
// if no file or too old, render and capture HTML page.
Webpage content in here
// Save the cached content to a file
$fp = fopen($cachefile, 'w');
// Send browser output