Example: FPC lifetime is 1 day but a page contains a block with a lifetime of 1 hour. How will that be handled? Will the page be served from the cache after the hour?
1 Answer
It did a quick test on it:
- I did set the FPC lifetime to 60 second
- I wrote a block and overrode
\Magento\Framework\View\Element\AbstractBlock::getCacheLifetime
to return 30 - Additionally I set
ttl="30"
in layout xml
Without the block the FPC lifetime was 60 seconds as expected. Then I inserted the block on the page and the FPC lifetime was still 60 seconds, the block was unaffected of the given 30 seconds.
Maybe I did set the cache lifetime of the block wrong but it seems like the FPC just ignores any lifetime set in the block.
-
1