I have the following scenario:
Each month we release new versions for our customers, and most of the time our customers call telling us that X functionality is not working the way it should. Because it is usually running a function that is from the previous version exactly because of the browser cache, in that case the client has to click CTRL + F5 or even clear all its cache for the X functionality to function properly.
I would like to know if there is any class in php or another language also that can be implemented in php to perform the cleaning of this cache. Home because for such a situation I can use the database to check if we are uploading version for the client or not and to perform cleaning of that browser.
Well today we cache all JS to gain a bit more in performance, we use the following:
header("Pragma: public");
header("Expires: 31536000");
header("Cache-Control: must-revalidate, post-check=900, pre-check=3600");
header("Cache-Control: public");
header("Content-Type: application/javascript");
header("Cache-Control: public, max-age=31536000");
I searched the internet a lot, and everyone I looked for did not succeed in what I was really wanting to do, finally I tried php's own function
Clearstatcache ()