[TYPO3-core] set_no_cache() usage is logged as warning

Philipp Gampe philipp.gampe at typo3.org
Sun Dec 2 00:47:14 CET 2012


Hi all,

I would like to have feedback to a problem I discussing with Stefan Neufeind 
already:

The method $GLOBALS['TSFE']->set_no_cache(), wich is defined at line 4406 of 
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

Always generates a warning in log for each usage.

However this method is called several times throughout core code for 
legitimate reasons like FE editing, several Admin Panel options, previewing 
pages and after detecting race conditions.
This should not result in a warning in the log, because it clutters the log 
with warnings while TYPO3 was used as intended.

I see the point to generate a warning if an extension triggers no_cache, but 
there should not be warnings for normal BE usage.

Basically there are three options to work in this problem
1) leave it as it is (aka do nothing)
2) decrease severity by one (from warning=2 to notice=1)
3a) introduce an optional parameter to switch from warning to notice for 
internal core usage
3b) create an own "internal" method to set no_cache


I would like to have feedback about which way to choose and why it was 
chosen to classify this as warning.

BTW: I created a change which provides a reason (feature since 4.3) for all 
internal core calls; this should give you an overview over all usages.
https://review.typo3.org/#/c/16925/

Cheers
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!



More information about the TYPO3-team-core mailing list