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

Thorsten Kahler thorsten.kahler at typo3.org
Sun Dec 2 12:53:50 CET 2012

Hi Philipp,

Philipp Gampe schrieb am 02.12.12 00:47:
> GLOBALS['TSFE']->set_no_cache() [...] Always generates a warning in log for each 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.

the reason is simple: calling set_no_cache() was and is in general _a
sign_ for bad cache/API/TS usage. But you're right: there are several
places in core where it's absolutely reasonable and valid to call that
method (FE editing, ...).

> 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/

I'd like to add a fourth option:

Identify calls from core code, which should be quite easy by the
namespace now, and decrease the severity to "notice" (or even "info"?)
for core calls. Some exceptions for "warning" should still be kept:
* no_cache in GET vars
* TS: config.no_cache = 1

If we don't want to add dependencies here, option 3a would be a
solution. But the origin of the set_no_cache() call would have to be
checked as well in this case.

Any other thoughts?


Thorsten Kahler
TYPO3 CMS Core Team member

TYPO3 ... inspiring people to share!
Get involved: typo3.org

More information about the TYPO3-team-core mailing list