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

Rupert Germann rupi at gmx.li
Fri Jun 5 12:11:53 CEST 2009


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

ok, makes sense.
 
> 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.

right.
when I made the patch to connect the treelist-cache to the caching framework
I first made it the easy way by simply using the cache_hash table for tree
lists, too. 
Then I "devlogged" the actual amount of cache gets and sets in this table
when rendering pages in FE and found that 20 queries to the treelist cache
(for an uncached page) are not that uncommon.
So I decided to stay with a seperate table and initialize an own cache for
this.
every additional function putting load on the caching framework should be
benchmarked somehow before actually adding it to the code. 

greets
rupert



More information about the TYPO3-team-core mailing list