DataHandlerCacheFlushingHook

class \TYPO3\CMS\Redirects\Hooks\DataHandlerCacheFlushingHook

Ensure to clear the cache entry when a sys_redirect record is modified or deleted

Table of Contents

Methods

rebuildRedirectCacheIfNecessary()  : void
Check if the data handler processed a sys_redirect record, if so, rebuild the redirect index cache

Methods

rebuildRedirectCacheIfNecessary()

Check if the data handler processed a sys_redirect record, if so, rebuild the redirect index cache

public rebuildRedirectCacheIfNecessary(array $parameters, DataHandler $dataHandler) : void

Parameters

$parameters : array
$dataHandler : DataHandler

Tags

todo

This hook is called for each record which needs to clear cache, which means this gets called for other records than sys_redirects, but also for each sys_redirect record which has been modified with this DataHandler call. Even if we can narrow down to rebuild only for specific source_hosts, this still means that we eventually rebuild the "same" cache multiple times. Find a better way to aggregate them and rebuild only once at the end.

On this page