Details
-
Bug
-
Resolution: Invalid
-
High
-
1.13.0
-
None
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
- is blocked by
-
EZEE-1884 Add ability to set TTL for landing page blocks
- Closed