[TYPO3-dev] set_no_cache is bad. What's next?

R. van Twisk typo3 at rvt.dds.nl
Thu Mar 29 17:43:25 CEST 2007


Dmitry Dulepov wrote:
> Hi!
>
>  From time to time I see that people try to use $TSFE->set_no_cache() in 
> extensions. You know what happens next: no caching for pages, 
> performance is terrible, web server is not responding, etc. At the same 
> time, sometimes, in really rare cases caching must be disabled. But 
> definitely not this way from extensions.
>
> Should we change this function in some way? Should it explain people 
> that using it is no-good?
>
> Personally I would vote for radical methods like (1) keeping it but 
> emptying or (2) writing commented phrase inside generated FE page that 
> set_no_cache was used, so do not expect good performance.
>
> Any other ideas/opinions?
>
>   
Hey Dmitry,

when I started with typo3... I also fell into that function.
set_no_cache() for me (back then) did mean no caching for
the current extension, instead of no caching for the entire page.
The function name wasn't clear enough, and I didn't knew (back then)
were to find the correct documentation for it..

What we can do is slowly depreciate the function creating, however
we need to notify the user, and in some way the extension owner.

These two options spring into my mind.

1) We setup some rules on TER that can search for these functions.
And send the maintainer a mail about that a function is going to get 
depreciated.

2) We can setup typo3 in debug mode. And every time a depreciated 
function is
going to get called we show that on the screen.

something like:

DEBUG: set_no_cache(); is going to get removed in 4.5



By depreciating functions we can make sure that we keep on growing
typo3 and at the same time remove our 'mistakes' from the libraries.

The bad thing is that it might get more hard to update a typo3 installation
because of the use of old extensions with new versions of typo3.



However, I do feel that something needs to be done and by notifying people
on time (like 6 months or more ahead) we can keep on using the current 
codebase
effectively.

It also makes sure that extensions are going to get depreciated or 
getting updated.
But not left alone right now.


RIes









-- 
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web:   http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk






More information about the TYPO3-dev mailing list