set cache headers only when something changed in the website (php, htaccess)
I'm running wordpress. Added this code in .htaccess file so that users will see latest version of website and not the cached one.
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0