Format:
Recent snippets matching tags of cache
<?php //Configuration $cache_time = 60*3; //second $cache_file = "cache/".md5($_SERVER['REQUEST_URI']); if(file_exists($cache_file)) { if((time()-filemtime($cache_file)) < $cache_time) { $cache_data = file_get_contents($cache_file); if (!(strlen($cache_data) < 18 || strcmp(substr($cache_data,0,2),"\x1f\x8b"))) header( 'Content-Encoding: gzip' ); echo $cache_data;
135 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
