[TYPO3-dev] WARNING!?? tslib_patcher, pp_chashchecker
Dmitry Dulepov [typo3]
dmitry at typo3.org
Mon Aug 27 13:19:53 CEST 2007
JoH asenau wrote:
>>>> The form could be chached, but the results must not of course. I
>>>> first used a hook to detect a POST request for that extension to
>>>> switch it to USER_INT but as this didn't seem to work in the live
>>>> environment I removed it again and switched the whole plugin to
>>>> USER_INT...
>>> I think I know how it can be done in the core but I afraid it will
>>> not pass through because it may break compatibility.
>>>
>>> Generally the idea is:
>>> - $TSFE->no_cache is saved before entering USER extension
>>> - $TSFE->set_no_cache() causes a flag set that tells typo3 that this
>>> extension does not want caching
>>> - $TSFE->no_cache is restored after exiting USER extension
>>> - if set_no_cache was called, extention's output will be discard and
>>> it will turned to USER_INT to be called later
>>>
>>> Additionally several new functions will appear in tslib to work with
>>> cache. All new extensions should use those. Something like
>>> disablePageCache(), setNoCache(). The first is obvious, the second
>>> sets the same flag as $TSFE->set_no_cache() when called from USER.
>>> Extension can exist right after setNoCache() without any futher
>>> content generation.
>>>
>> I think it could solve this end of the caching problem. We are all
>> sure that the no_cache flag has to be disabled or removed. That can't
>> be done without breaking compatibility somewhere. This solution would
>> do this in a very soft way. I think most existing extensions would
>> keep working and most of them would work in the way the author inted
>> them to do.
>>
>> It doesn't solve all problems, like that of forms sending the
>> no_cache flag, because of bad code generated by the kickstarter.
>>
>> Fine concept. I long for to see it implented.
>
> Since when is it up to any developer to decide, if something which has been
> created by another developer has to be cached or not?
Wait, you did not understand the idea :) It will not be cached only if
extension says that it should not be cached :) I.e. if extension calls
set_no_cache(), than we do not cache ~extensions~ output. But we do not
allow to prevent whole page caching this way.
> Removing the flag completely is as restrictive as implementing it into a
> plugin that will disable caching of a whole page for the sake of a non
> cached minibasket or whatever.
There is no need to disable whole page cache even in this case. But if
you still want to do it, there will be a new method, which says
disablePageCache.
> So removing the flag is not an option, but it should be possible to disable
> it by TS or maybe in the install tool, so that the administrator will be the
> one who decides if an extension should be allowed to set the flag or not.
Update Manager is there ;)
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-dev
mailing list