I’m caching each page in its own directory rather than in a common directory:
www/contact/index.php
www/contact/index.php.cache
It’s simpler to implement but now I must clear each file manually.
Ideally I’d like to run www/clear-cache.php and have it find and delete all files that end in .php.cache anywhere in www/
I ask here cause I’ve already update the site and now I’m kinda in a hurry to clear the cache.
in php this can be done by using the following code
This goes through each file and directory looking for any files that contain cache in the file name and delete it and is called by:
I will state to backup the site first to make sure that it does not delete a file that is needed that has cache in the filename. Or if you want an automatic cache system for your site, you can check out my answer on Simple PHP caching with more than 3 parts