Apache caching for dynamic content
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
OS: Ubuntu 16.04
Installed with ISPConfig 3.1 (followed the how to: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/)
I'm running several clients on my server with different kind of CMS solutions i.e. Wordpress, Joomla, Prestashop etc. all running PHP that I found I could optimize performance wise with Apache's mod_cache (cache_disk and file_cache). I found different articles pointing me to a final configuration that looks like the following.
<IfModule mod_cache_disk.c>
CacheRoot /var/cache/apache2/mod_cache_disk
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheQuickHandler off
CacheLock on
CacheLockPath /tmp/mod_cache-lock
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
CacheDisable /wp-admin
<Location />
CacheEnable disk
CacheHeader on
CacheDefaultExpire 900
CacheMaxExpire 86400
CacheLastModifiedFactor 0.5
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header merge Cache-Control public
FileETag All
</Location>
</IfModule>
With this configuration I am able to optimize performance 20% on my setup for a simple Wordpress solution.
Everything looked good until I stumbled upon a prestashop client. The situation was that every single page/link was showing the same content as the first visit until the cache was cleared. URLs were changing but the content stayed the same.
My question is, how this can this behavior be avoided and if I can tune my configuration to suit more widely on dynamic content so that i don't have to worry about speciel cases?
apache-httpd php cache
add a comment |Â
up vote
0
down vote
favorite
OS: Ubuntu 16.04
Installed with ISPConfig 3.1 (followed the how to: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/)
I'm running several clients on my server with different kind of CMS solutions i.e. Wordpress, Joomla, Prestashop etc. all running PHP that I found I could optimize performance wise with Apache's mod_cache (cache_disk and file_cache). I found different articles pointing me to a final configuration that looks like the following.
<IfModule mod_cache_disk.c>
CacheRoot /var/cache/apache2/mod_cache_disk
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheQuickHandler off
CacheLock on
CacheLockPath /tmp/mod_cache-lock
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
CacheDisable /wp-admin
<Location />
CacheEnable disk
CacheHeader on
CacheDefaultExpire 900
CacheMaxExpire 86400
CacheLastModifiedFactor 0.5
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header merge Cache-Control public
FileETag All
</Location>
</IfModule>
With this configuration I am able to optimize performance 20% on my setup for a simple Wordpress solution.
Everything looked good until I stumbled upon a prestashop client. The situation was that every single page/link was showing the same content as the first visit until the cache was cleared. URLs were changing but the content stayed the same.
My question is, how this can this behavior be avoided and if I can tune my configuration to suit more widely on dynamic content so that i don't have to worry about speciel cases?
apache-httpd php cache
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
OS: Ubuntu 16.04
Installed with ISPConfig 3.1 (followed the how to: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/)
I'm running several clients on my server with different kind of CMS solutions i.e. Wordpress, Joomla, Prestashop etc. all running PHP that I found I could optimize performance wise with Apache's mod_cache (cache_disk and file_cache). I found different articles pointing me to a final configuration that looks like the following.
<IfModule mod_cache_disk.c>
CacheRoot /var/cache/apache2/mod_cache_disk
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheQuickHandler off
CacheLock on
CacheLockPath /tmp/mod_cache-lock
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
CacheDisable /wp-admin
<Location />
CacheEnable disk
CacheHeader on
CacheDefaultExpire 900
CacheMaxExpire 86400
CacheLastModifiedFactor 0.5
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header merge Cache-Control public
FileETag All
</Location>
</IfModule>
With this configuration I am able to optimize performance 20% on my setup for a simple Wordpress solution.
Everything looked good until I stumbled upon a prestashop client. The situation was that every single page/link was showing the same content as the first visit until the cache was cleared. URLs were changing but the content stayed the same.
My question is, how this can this behavior be avoided and if I can tune my configuration to suit more widely on dynamic content so that i don't have to worry about speciel cases?
apache-httpd php cache
OS: Ubuntu 16.04
Installed with ISPConfig 3.1 (followed the how to: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/)
I'm running several clients on my server with different kind of CMS solutions i.e. Wordpress, Joomla, Prestashop etc. all running PHP that I found I could optimize performance wise with Apache's mod_cache (cache_disk and file_cache). I found different articles pointing me to a final configuration that looks like the following.
<IfModule mod_cache_disk.c>
CacheRoot /var/cache/apache2/mod_cache_disk
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheQuickHandler off
CacheLock on
CacheLockPath /tmp/mod_cache-lock
CacheLockMaxAge 5
CacheIgnoreHeaders Set-Cookie
CacheDisable /wp-admin
<Location />
CacheEnable disk
CacheHeader on
CacheDefaultExpire 900
CacheMaxExpire 86400
CacheLastModifiedFactor 0.5
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header merge Cache-Control public
FileETag All
</Location>
</IfModule>
With this configuration I am able to optimize performance 20% on my setup for a simple Wordpress solution.
Everything looked good until I stumbled upon a prestashop client. The situation was that every single page/link was showing the same content as the first visit until the cache was cleared. URLs were changing but the content stayed the same.
My question is, how this can this behavior be avoided and if I can tune my configuration to suit more widely on dynamic content so that i don't have to worry about speciel cases?
apache-httpd php cache
asked Feb 7 at 8:57
SteffenNielsen
1713
1713
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422487%2fapache-caching-for-dynamic-content%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password