I use a method with php and .htaccess to cache search results. The two files are begin_caching.php and end_caching.php In the begin_caching.php there is written "$cachetime = 8000000; // Seconds to cache files for" At the time of caching I thought that 8000000 would be long enough time to cache the content. However I do regret that now and want it to be cached forever. Is it enough to change the time here or do I have to cache all pages again changing the cache time ? As you understand I do not understand this system so it may be a stupid question to you.
Lil more details about your methods, maybe some code and a reason for you wanting to cache all search results, I'm a little confused as to why you might want to do this.
Here is the method, it works very well. http://www.ilovejackdaniels.com/php/caching-output-in-php/ What part or where is deciding and telling when to delete the cached files ? What should I change to make the already cached files not getting deleted ? The reason I am caching is to speed up the loading of pages. My server is not to fast.
if (time() - $cachetime < $cachefile_created ) { //ob_start('ob_gzhandler'); @readfile($cachefile); //ob_end_flush(); exit(); } PHP: if ( true ) would be the quickest way of going around it without changing too much I think.....
Thanks krakjoe, but I don`t know php at all. Just managed to install this with a step by step instruction So it looks like this now: if (time() - $cachetime < $cachefile_created ) { //ob_start('ob_gzhandler'); @readfile($cachefile); //ob_end_flush(); exit(); } How should it look like if i don`t want the cache to expire ?