Review main Abandoned

95877[FEATURE] Add PSR-14 event for page URI cache hash calculation

Benni Mack CR 0 V 0 Hard +302 −25 updated 09/16/26, 14:26

Commit message

Core\Routing\PageRouter, which lives in EXT:core, calculated the
"cHash" query argument for generated page links itself, using
Frontend\Page\CacheHashCalculator and CacheHashConfiguration. This
forces a hard dependency of EXT:core on EXT:frontend, even though
cHash is exclusively a frontend caching concern: it prevents cache
poisoning of a page in the frontend page cache.

Replace the direct dependency with a new PSR-14 event,
Core\Routing\Event\BeforePageUriCacheHashIsAppliedEvent, dispatched
whenever a generated page link has dynamic query arguments. EXT:core
no longer knows how to calculate a cHash; EXT:frontend registers a
listener, Frontend\EventListener\CalculatePageUriCacheHashEventListener,
that reproduces the exact calculation PageRouter did before. If no
listener sets a cache hash, none is appended to the generated URI.

Review

  • Code review CR 0
  • Verified V 0
    • core-ci +1 CI

Issues 1

Files 7

Review log 23

  1. Benni Mack uploaded patch set 1 09/16/26, 13:51

  2. core-ci voted on patch set 1 V +1 09/16/26, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108689

  3. Benni Mack abandoned the change 09/16/26, 14:26