Skip to content
Snippets Groups Projects
Commit ee51504c authored by Stefan Bürk's avatar Stefan Bürk Committed by Benni Mack
Browse files

[BUGFIX] Use clustered cache entries per domain for redirects

'ext:redirect' now clusters the redirect cache into dedicated
parts per domain, which reduces the data amount needed to load
on redirect handling in the frontend to the absolute minimum.

On the other hand, when rebuilding a cache this is narrowed down
to the related domain, thus avoiding retrieving and caching all
redirects, which may reduce the processing time in the backend
on changing redirects or auto redirects creation on page updates.

This works around some flaws for some instances and use cases,
but do not harm on smaller instances with lower redirects count.

* read and write redirect cache by domain based identifier
* removed one array level from cached information and reduced
  one array key level in redirect matching code
* cache identifier for domain entries are build using 'sha1()'
* combined with early redirects introduced with #96480 this
  reduces the loaded data even more, as it is done in chunks
* adjusted unit tests to reflect two redirect cache service
  calls, one for the domain and one for wildcard "*".
* rebuilding cache through datahandler hook now rebuilds
  only for the related 'source_host', thus avoiding rebuild
  of all redirects for every change. This may still be further
  improved for multi record operations with the same domain.
  A 'rebuildAll()' fallback stayed as a last defense to cover
  cases where specific source_host cannot be determined.

Resolves: #96617
Releases: main, 11.5
Change-Id: Id335017cf890dca7c57e892a2561c3555348a668
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73541


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent 19e53b7e
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment