- Issue created by @prudloff
We noticed that when a facet block from a view with a low max age does not have any condition, the view's max-age is applied to every page even if the facet is not displayed.
This happens because if the block does not have any condition, then FacetBlock::blockAccess()
is always executed and the AccessResult's cache depends on the facet that in turn depends on the view display (which has a 3600 seconds max age).
A workaround is to add a condition to the block to make sure it is only displayed on the view page. (If the condition is false, then FacetBlock::blockAccess()
is never called and the max age is not retrieved.) But that kind of defeats the point of the "Hide facet when facet source is not rendered" option.
I am not sure what a correct fix would be, since it seems legitimate that the block access cache depends on the facet's cache metadata.
Active
2.0
Code