Skip to content
Snippets Groups Projects
Commit 9d914dcb authored by Sascha Nowak's avatar Sascha Nowak Committed by Christian Kuhn
Browse files

[BUGFIX] Avoid broken treelist cache

The cache_treelist handling in PageRepository is broken
for a long time already: Entries are get() with an expiry
time that is not properly set(), so get() is never
successful.
There is a second bug in getDescendantPageIdsRecursive()
cache handling: get() is done without BE user restriction,
but set() is only done when no BE user is logged in. This
way, non-BE user state could swap into BE user state, *if*
the cache would work.

The patch avoids reading and writing the cache instead
of fixing cache access: We can not risk bugs in v12 if
the cache would suddenly start working but has side effects:
Issues like that would be hard to find, hard to report,
and have severe impact on FE rendering.

Note typical use case of the method are the "menu" content
elements, plus the extbase 'starting point' logic. So its
not the menu rendering in general - we would otherwise have
most likely found the broken cache much earlier.

The patch effectively increases performance since the
get() and set() queries are gone.

Resolves: #103139
Releases: main, 12.4
Change-Id: Icc8d13b583f77d6ffc186d391d46d6830ee50889
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83055


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 05037e0b
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