[TYPO3-core] RFC: #11271: Use 2 level cache for BEgetRootLine

Martin Kutschker masi-no at spam-typo3.org
Fri Jun 5 11:09:41 CEST 2009


Rupert Germann schrieb:
> hi steffen,
> 
> one question on reading: why do you introduce a new static var as firstlevel
> cache and drop the formerly used $GLOBALS['T3_VAR']['BEgetRootLine_cache']?
> I wouldn't be shure that this value isn't used elsewhere.
> 
> suggestion: leave the first level in $GLOBALS['T3_VAR'
> ['BEgetRootLine_cache']

IMHO shouldn't be used elsewhere as it is private*. If it's used from
somewhere else the cache must be refactored.

Can we have a two/three/multi-level cache in t3lib/cache first?

And, when do these caches expire? It's one thing to cache a rootline
calculation for one request, it's another to store it for a longer time
period. The rootline may change ANY TIME, so every move/delete action in
"pages" has to invalidate this cache.

So please think about how the cache is managed and if the overhead of
maintaining the cache (lots of insert/update/deletes in "cache_hash") is
worth the gain.

Masi

* I wonder why it's stored in a variable now.


More information about the TYPO3-team-core mailing list