[TYPO3-dev] TypoScript: cache_period for USER objects

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Nov 22 09:35:50 CET 2006


Martin Kutschker schrieb:

>>> I'd like to know if there is a more general approach on setting caching
>>> for USER objects, like:
>>> plugin.tx_myweather_p1 = USER
>>> plugin.tx_myweather_p1 {
>>>  includeLibs = ...
>>>  userFunc = ...
>>>  cache_period = 3600
>>> }
>>
>> Not possible, because once your plugin is cached in a page as an USER
>> object, TYPO3 will never know which plugin were called before the cache
>> for the whole page expires. The output of your plugin will just be
>> "merged" with the output of the page.
> 
> I thought of an API call for USER objects to modify the caching time of
> the rendered page. The resulting time would be the smallest period set
> by configuration or rendered USER objects.

In my opinion the admin could set the time himself, if he wants to, for
that specific page, in TS directly, no need for additional features to
do that.

I think the problem is that Oliver wants the whole page to be cached for
a day, but just a tiny part of it to be updated only each hour.
Currently he will only be able to do so by either expiring the whole
page each hour (meaning all plugins on that page needs to be
regenerated) or by using USER_INT, but then the whole TYPO3-framework
has to load for each page call, and not only each hour when his plugin
"expires".

Cheers,
Ernesto




More information about the TYPO3-dev mailing list