[TYPO3-commerce] $GLOBALS['TSFE']->set_no_cache() --> bad practice --> why using it?

Ingo Schmitt mailinglisten at i-schmitt.de
Wed Aug 29 18:17:42 CEST 2007


Hi Franz
> Hi,
> 
> I just downloaded the nightly build from SVN today, installed it and 
> noticed that it became slower. Then I noticed that my shop-pages don't 
> get cached anymore. After some research I found out, that commerce 
> really often uses the very bad '$GLOBALS['TSFE']->set_no_cache()'.
> 
> Why do you do that? Why prevent caching of the complete page and not 
> only of the extension itself? Setting the extension to USER_INT would be 
> a far better solution in that case.
> 

Currently there are only 3 calls to set_no_cache in pi1. These calles 
are only done, it the given get parameter are not correct, mainly if 
someone is trying to change the parameter by guessing.
We added in the last days checks if the given product uid and category 
uid match to the selected categroy in the backend, so if these 
parameters are not correct, we are showing the entry page for the plugin 
and we don't want to get this page cached and indexed, since already the 
call with the given parameter is wrong.

> Or splitting up the pi1 module in two modules - one cached singleView 
> and a USER_INT listView.
> 
> Or maybe implement the TS-Switch from JoH for dynamically making the 
> extension USER or USER_INT.
> 
> Everything is better then using '$GLOBALS['TSFE']->set_no_cache()' which 
> is the worst thing you can do. Actually, there is currently a big 
> discussion in cache-handling over in the dev-list. Maybe you should take 
> a look there.

We have taken a look there, and, if you had a look at the code, pi1 is 
already a USER object and no_cache is not set by default.

Regards

Ingo

> 
> -- 
> Kind regards,
> Franz Koch


Mit freundlichen Gruessen
-- 
Ingo Schmitt                        mailto:is at marketing-factory.de
Marketing Factory Consulting GmbH   http://typo3.marketing-factory.de/
Content Management mit Typo3: Beratung - Schulung - Realisierung


More information about the TYPO3-project-commerce mailing list