Details
-
Bug
-
Resolution: Fixed
-
Critical
-
2.5.12
Description
render_esi as of v2.5.12 includes request specific info like pathinfo which may result in separate caching of the same HTML fragment for different URLs. For example:
- We are caching a footer used in page layout for the whole site site access.
- We enter the following URL: /site/folder1 - footer is being cached
- We enter the following URL: /site/folder2 - footer is being cached again because of the pathinfo param which includes the current URL (/site/folder2) instead of being loaded itself from the cache from step 2.
Effect: Performance issues in production as the load to backend increases a lot.
URL on v2.5.8:
/_fragment?_hash=4TZ7ugk4oEFTwSrQJ73B8K 6ZGCweV0UxWOzuGXFM94=&_path=locationId=42&viewType=line&serialized_siteaccess=O:38:"eZ\Publish\Core\MVC\Symfony\SiteAccess":3:{s:4:"name";s:10:"test_site4";s:12:"matchingType";s:38:"compound:logicalAnd(Map\URI, Map\Host)";s:7:"matcher";O:66:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd":1:{s:14:"*subMatchers";a:2:{s:7:"Map\URI";O:54:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI":3:{s:6:"*map";a:0:{}s:13:"*reverseMap";a:0:{}s:6:"*key";s:5:"site4";}s:8:"Map\Host";O:55:"eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host":3:{s:6:"*map";a:0:{}s:13:"*reverseMap";a:0:{}s:6:"*key";s:9:"localhost";}}}}&_format=html&_locale=en&_controller=ez_content:viewAction
URL on v2.5.12 (please, locate "pathinfo" attribute):
_fragment?_hash=XNH6CCYggMKM3c5b 94BVWf4wyHSKrEVEROABrIXLrI=&_path=locationId=56&viewType=line&serialized_siteaccess={"name":"test_site2","matchingType":"compound:logicalAnd(Map\\URI, Map\\Host)","matcher":"eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\\LogicalAnd"}&serialized_siteaccess_matcher={"config":[],"matchersMap":[],"subMatchers":{"Map\\URI":{"key":"site2","map":{"site2":true},"reverseMap":null},"Map\\Host":{"key":"localhost","map":{"localhost":true},"reverseMap":null}},"matcherBuilder":[],*"request":{"scheme":"http","host":"localhost","port":8042,"pathinfo":"\/site2\/group","queryParams":[],"languages":["en_US","en"],"headers":[]}}*&serialized_siteaccess_sub_matchers[eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI]={"key":"site2","map":{"site2":true},"reverseMap":null}&serialized_siteaccess_sub_matchers[eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host]={"key":"localhost","map":{"localhost":true},"reverseMap":null}&_format=html&_locale=en&_controller=ez_content:viewAction
Steps to reproduce:
The exact setup from https://jira.ez.no/browse/EZP-31718.
Result:
URL contains pathinfo or queryParams attributes.
Expected result:
URL should not contain pathinfo or queryParams attributes (languages to be decided).
Attachments
Issue Links
- relates to
-
EZP-31718 render_esi function will not be cached properly when using Compound Matcher
- Closed