Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1883

Landing page Collection Block isn't cached

    XMLWordPrintable

    Details

      Description

      Customer reported, that Landing Page Collection Block isn't cached even though TTL value is set. Response contains header: Cache-Control: max-age=0 private.
      As there is no possibility for the user to set TTL, it needs to be set directly in a database to verify this issue.

      Steps to reproduce:
      1. Create clean v1.13 eZ Platform Enterprise installation
      2. Configure reverse proxy like varnish (tested on varnish 5)
      3. Launch your installation
      4. Try to add Collection Block to default Landing Page
      5. Submit block form and publish Landing Page
      6. Go to content browse menu and select currently edited landing page.
      7. Go to "Details" section and get ContentId value.
      8. Launch database client and perform following query:

      select data_text, version from ezcontentobject_attribute where contentobject_id = <ContentId>;

      9. In data_text field try to find <block type="collection" ...> which corresponds with Collection Block which you have created.
      10. Set attribute ttl of this field to value e.g. 100.
      11. Save this record.
      12. Go back to the Landing Page editor and edit Collection Block, submit the changes and publish Landing Page.
      13. Check new version of Landing Page block by refreshing query which was mentioned earlier.
      14. Note, that ttl value wasn't overridden.
      15. Visit landing page again. Note that changes are visible immediately even though ttl value is set to 100.

      The invalid line is most likely: https://github.com/ezsystems/EzLandingPageFieldTypeBundle/blob/master/src/Controller/BlockController.php#L310. It should be

      $response->setSharedMaxAge();

      .

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              konrad.oboza@ez.no Konrad Oboza
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: