vividona Posted November 14, 2011 Share Posted November 14, 2011 How can I delete cache files when any update take place. I don't need to delete files after certain period of time pass. Quote Link to comment https://forums.phpfreaks.com/topic/251100-delete-cache-files/ Share on other sites More sharing options...
joel24 Posted November 14, 2011 Share Posted November 14, 2011 create a delete function and execute it each time a update is executed? Quote Link to comment https://forums.phpfreaks.com/topic/251100-delete-cache-files/#findComment-1287930 Share on other sites More sharing options...
vividona Posted November 14, 2011 Author Share Posted November 14, 2011 create a delete function and execute it each time a update is executed? Yes but how can I compare page contents with the cached file contents Quote Link to comment https://forums.phpfreaks.com/topic/251100-delete-cache-files/#findComment-1287946 Share on other sites More sharing options...
trq Posted November 14, 2011 Share Posted November 14, 2011 Get the contents of both, hash them using md5, if the hash's are different, the data is different. Quote Link to comment https://forums.phpfreaks.com/topic/251100-delete-cache-files/#findComment-1287947 Share on other sites More sharing options...
Adam Posted November 14, 2011 Share Posted November 14, 2011 Just to add, there's also md5_file which you'll probably find useful. Quote Link to comment https://forums.phpfreaks.com/topic/251100-delete-cache-files/#findComment-1287951 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.