How enable apache caching but allow changing the cache when file is changed (for that one file)?

After enabling the cache settings in httpd.conf, I am unable to see any changes I make to any file (from index.php to style.css in my theme files). Nothing I do causes Apache/PHP/Wordpress to serve up the new version of the file. The only thing that works is turning off caching (by removing from httpd.conf and restarting apache).

CacheEnable disk /
CacheRoot /webapps/cache/app1
CacheDefaultExpire 3600
CacheDisable /wp-admin
CacheDirLevels 3
CacheDirLength 5
CacheIgnoreCacheControl On
CacheMaxFileSize 1000000000
CacheIgnoreNoLastMod On
CacheMaxExpire 1209600

But that’s not how I want caching to work. If the file is changed, it should serve up the new version. How do I enable it to work like that and change the cache version when I alter the file?

Related posts

Leave a Reply