Feature: #96968 - PSR-14 event for avoid loading Frontend pages from cache

See forge#96968


A new PSR-14 event ShouldUseCachedPageDataIfAvailableEvent is added which allows TYPO3 Extensions to register event listeners to modify if a page should be read from cache (if it has been created in store already), or if it should be re-built completely ignoring the cache entry for the request.


The new PSR-14 event can be used for avoiding loading from cache when indexing via CLI happens from an external source, or if the cache should be ignored when logged in from a certain IP address.

Registration of the event in your extension's Services.yaml:

    - name: event.listener
      identifier: 'my-package/avoid-cache-loading'

The corresponding event listener class:

use TYPO3\CMS\Frontend\Event\ShouldUseCachedPageDataIfAvailableEvent;

class MyEventListener {

    public function __invoke(ShouldUseCachedPageDataIfAvailableEvent $event): void
        if (!($event->getRequest()->getServerParams()['X-SolR-API'] ?? null)) {