---
title: "Feature: #96968 - PSR-14 event for avoid loading Frontend pages from cache"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-96968-1663513232"
source: "Changelog/12.0/Feature-96968-PSR-14EventForAvoidLoadingFrontendPagesFromCache.rst"
typo3-version: "12.0"
typo3-major: 12
type: "feature"
issue: 96968
forge: "https://forge.typo3.org/issues/96968"
tags: ["Frontend", "PHP-API", "ext:frontend"]
rendered: "2026-09-18T17:00:34+00:00"
---

# Feature: #96968 - PSR-14 event for avoid loading Frontend pages from cache {#feature-96968-1663513232}

See [forge#96968](https://forge.typo3.org/issues/96968)

## Description {#description}

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.

## Impact {#impact}

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`:

```yaml
MyVendor\MyPackage\MyEventListener:
  tags:
    - name: event.listener
      identifier: 'my-package/avoid-cache-loading'
```

The corresponding event listener class:

```php
use TYPO3\CMS\Frontend\Event\ShouldUseCachedPageDataIfAvailableEvent;

class MyEventListener {

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