Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21988

Static cache is not automatically updated when async publishing is enabled

    Details

      Description

      Steps to reproduce:

      1. Enable async publishing, and run async daemon;
      2. Enable static cache;
      3. Edit an article and publish. Static cache is not rebuild.

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          Pull-request: ezpublish-legacy#842.

          Show
          Bertrand Dunogier added a comment - Pull-request: ezpublish-legacy#842 .
          Show
          Bertrand Dunogier added a comment - ezpublish-legacy#842 merged to ezpublish-legacy/master@86be28d .
          Hide
          Joao Pingo (Inactive) added a comment - - edited

          @Bertrand and doc
          This static cache feature is not completely documented on doc.ez.no, the only completed documentation is on share.ez.no:
          http://share.ez.no/learn/ez-publish/ez-publish-performance-optimization-part-3-of-3-practical-cache-and-template-solutions/%28page%29/3

          I've several questions about static cache in 5.x versions
          For this feature to work in 5.x, we need to do some adjustments in rewrite rules and settings file:
          I've made the following:

          1. Installed ezp5 with ezdemo (used Master git branch)
          2. Edited the ezpublish_legacy/settings/override/site.ini.append.php
            Added the settings:

            [ContentSettings] 
            StaticCache=enabled
            

          3. Created the file for cache settings ezpublish_leagacy/settings/override/staticcache.ini.append.php with the following settings

            [CacheSettings] 
            HostName=ezp5.dev.vagrant
            StaticStorageDir=/var/www/html/ezpublish5/web/static // Changed to place static folder inside web folder
            MaxCacheDepth=4   
            # A list of url's to cache 
            CachedURLArray[]=/*
            CachedSiteAccesses[] 
            CachedSiteAccesses[]=eng
            

          4. In the ezpublish5 rewrite rule added the following settings in the ezp5 virtual host just bellow "ReWriteEngine" on line

            #Static cache settings
            RewriteCond /var/www/html/ezpublish5/web/static/index.html -f
            RewriteRule ^/$ /static/index.html [L]
            RewriteCond /dat/ez.no/static/index.html -f
            RewriteRule ^$ /static/index.html [L]
            RewriteCond %{REQUEST_METHOD} !^POST$
            RewriteCond /var/www/html/ezpublish5/web/static$1/index.html -f
            RewriteRule ^(.*)$ /static$1/index.html [L]
            RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php
            

          5. After this run the the following script in ezpublish_legacy folder
            php bin/php/makestaticcache.php -s eng
          6. The satic cache is generated, and accessing site from eng is showing cached html files
            Question: is this the correct way for 5.x ?, if so, the changes must be documented
          Show
          Joao Pingo (Inactive) added a comment - - edited @Bertrand and doc This static cache feature is not completely documented on doc.ez.no, the only completed documentation is on share.ez.no: http://share.ez.no/learn/ez-publish/ez-publish-performance-optimization-part-3-of-3-practical-cache-and-template-solutions/%28page%29/3 I've several questions about static cache in 5.x versions For this feature to work in 5.x, we need to do some adjustments in rewrite rules and settings file: I've made the following: Installed ezp5 with ezdemo (used Master git branch) Edited the ezpublish_legacy/settings/override/site.ini.append.php Added the settings: [ContentSettings] StaticCache=enabled Created the file for cache settings ezpublish_leagacy/settings/override/staticcache.ini.append.php with the following settings [CacheSettings] HostName=ezp5.dev.vagrant StaticStorageDir=/var/www/html/ezpublish5/web/static // Changed to place static folder inside web folder MaxCacheDepth=4 # A list of url's to cache CachedURLArray[]=/* CachedSiteAccesses[] CachedSiteAccesses[]=eng In the ezpublish5 rewrite rule added the following settings in the ezp5 virtual host just bellow "ReWriteEngine" on line #Static cache settings RewriteCond /var/www/html/ezpublish5/web/static/index.html -f RewriteRule ^/$ /static/index.html [L] RewriteCond /dat/ez.no/static/index.html -f RewriteRule ^$ /static/index.html [L] RewriteCond %{REQUEST_METHOD} !^POST$ RewriteCond /var/www/html/ezpublish5/web/static$1/index.html -f RewriteRule ^(.*)$ /static$1/index.html [L] RewriteRule !\.(gif|css|jpg|png|jar|ico|js)$ /index.php After this run the the following script in ezpublish_legacy folder php bin/php/makestaticcache.php -s eng The satic cache is generated, and accessing site from eng is showing cached html files Question: is this the correct way for 5.x ?, if so, the changes must be documented
          Hide
          Joao Pingo (Inactive) added a comment -

          Missing Rewrite rule from documentation

          Show
          Joao Pingo (Inactive) added a comment - Missing Rewrite rule from documentation
          Hide
          Joao Pingo (Inactive) added a comment -

          @Bertrand
          Thanks for the info, i've created a doc issue about this changes https://jira.ez.no/browse/EZP-22059

          Show
          Joao Pingo (Inactive) added a comment - @Bertrand Thanks for the info, i've created a doc issue about this changes https://jira.ez.no/browse/EZP-22059
          Hide
          Joao Pingo (Inactive) added a comment -

          QA Approved

          Show
          Joao Pingo (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 1 hour, 30 minutes
                3d 1h 30m