Skip to content

ModifyCacheLifetimeForPageEvent triggert earlier than expected #116

Description

@codemonkey1988

In TYPO3 v13, the extension uses \TYPO3\CMS\Frontend\Cache\CacheLifetimeCalculator::calculateLifetimeForPage to get the maximum cache lifetime for a page. Within this method, event listeners for \TYPO3\CMS\Frontend\Event\ModifyCacheLifetimeForPageEvent are executed.

Without this extension, the listeners get executed after all content generation is done. But because of using the CacheLifetimeCalculator, the listeners are executed during dataProcessing (mostly for the page Fluidtemplate I guess). This alone might not be a problem, the the calculated lifetime is cached inside the runtime cache. Therefore the listeners aren't executed after content generation because the cache entry already exists.

This can be problematic when during content creation, information is gathered for calculating the page cache lifetime.

I guess this behavior does not affect many installations, but might be the reason for cache problems that are really hard to reproduce.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions