[TYPO3-dev] cObj Cache, COA and HMENU

JoH asenau info at cybercraft.de
Mon Apr 8 16:25:31 CEST 2013


Am 08.04.2013 15:32, schrieb Elmar Hinz:
> According to forge cObj Cache does not work for COA and MENU directly:
>
> http://forge.typo3.org/issues/34307#note-1
>
> HINT: Please take into account in which order stdWrap is processed for
> your current cObject and what content is processed/generated inside that
> stdWrap. E.g. using TEXT cObjects works perfectly, while using stdWrap
> on COA or HMENU will be processed after the inside content is rendered.
> In latter case caching is not efficient at all, as the content will be
> rendered anyways. In those case you can still nest your inside an outer
> stdWrap to gain the same effect:
>
> TsRef doesn't name this limitation.
> What is right?

Well - actually caching does work for COA and HMENU as well, but it is 
sometimes not very useful to apply it directly.

something = COA
something {
   cache.key = cachesomething
   10 = TEXT
   10.value = whatever
   wrap = blah|blah
   outerWrap = blah|blah
}

This would cache wrap, outerWrap AND the TEXT object, but still the only 
the TEXT object would be rendered with every request, even though it 
would be ignored by the output.

something = TEXT
something {
   cache.key = cachesomething
   cObject = COA
   cObject {
     10 = TEXT
     10.value = whatever
   }
   wrap = blah|blah
   outerWrap = blah|blah
}

This would cache wrap, outerWrap AND the TEXT object, but for the cost 
of an additional cObjGetSingle call due to the nested structure. So in 
some usecases it might not be too different to the first example.

In both cases there would be a fully rendered item available for the 
given cache key.
And this might be retrieved by a completely different method that would 
not make use of TypoScript at all. So even the first one would give you 
a cached result.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com



More information about the TYPO3-dev mailing list