Apache caching for dynamic content

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question
























    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?







    share|improve this question






















      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?







      share|improve this question












      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?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 7 at 8:57









      SteffenNielsen

      1713




      1713

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay