Apache mod_cache and mod_disk_cache
Hello cPanel Community,
I've ran out of ideas and was hoping somebody here bumped into same problem and managed to fix it. I'm trying to setup mod_cache and mod_disk_cache for caching. Unfortunately I can't seem to get it to work and cannot figure out where is the problem. Here is where I am stuck :
X-Cache: MISS from site.com
X-Cache-Detail: "cache miss: attempting entity save"
I am using the following configuration in Apache -> Include
At some point I thought that it will not work with Apache + mpm_event + php-fpm. I also tested same configuration on CloudLinux + LSAPI where same cache miss occurs. The files are being created inside /var/cache/apache2/mod_cache_disk/ but instead of sending the browser the cached content, it actually refreshes the cache on the server. Setting "CacheIgnoreCacheControl On" is actually "fixing it" but everything will get cached and no new content will be shown. Tried adding a post in Wordpress and it will not appear, no matter what requests I was sending. Any help is appreciated.
CacheQuickHandler off
CacheIgnoreNoLastMod On
CacheStoreExpired On
CacheDefaultExpire 3600
CacheIgnoreCacheControl Off
CacheLastModifiedFactor 0.5
CacheIgnoreHeaders Set-Cookie Cookie
CacheHeader on
CacheDetailHeader on
CacheLock on
CacheMaxExpire 86400
CacheMinExpire 3600
CacheDisable /wp-admin
CacheDisable /wp-login.php
CacheDisable /wp-cron.php
CacheRoot /var/cache/apache2/mod_cache_disk/website_name.com
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 2
CacheMaxFileSize 10000
CacheMinFileSize 1
At some point I thought that it will not work with Apache + mpm_event + php-fpm. I also tested same configuration on CloudLinux + LSAPI where same cache miss occurs. The files are being created inside /var/cache/apache2/mod_cache_disk/ but instead of sending the browser the cached content, it actually refreshes the cache on the server. Setting "CacheIgnoreCacheControl On" is actually "fixing it" but everything will get cached and no new content will be shown. Tried adding a post in Wordpress and it will not appear, no matter what requests I was sending. Any help is appreciated.
Please sign in to leave a comment.
Comments
0 comments