[TYPO3-mvc] Cache duration for plugin content

Susanne Moog susanne.moog at typo3.org
Mon May 7 18:26:56 CEST 2012


On 05/06/2012 09:42 PM, Christian Kuhn wrote:
> On 05/06/2012 09:35 PM, Christian Kuhn wrote:
>> But extension 'enetcache' from TER provides an API to do exactly what
>> you want.
> 
> Ah, sry, forgot to mention the pitfall: There is currently no documented
> way to use enetcache in extbase context as controller or action wrapper.
> It is do-able, though.

It is actually dead simple:

Just make an instance of enetcache at the beginning of your action and
call get with your identifier, return if there was a result, else run
through your action and do the "$this->view->render" yourself, add it to
the cache via set (and your identifier) and return the rendered view.
Finished ;)

Cheers,

Susi

-- 
Susanne Moog
TYPO3 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list