[TYPO3-dev] Disabling caching while using the caching framework

Christian Weiske christian.weiske at netresearch.de
Thu May 19 09:41:35 CEST 2011


Hi again,

> The standard typo3 page caching may be disabled/circumvented by
> adding "?no_cache=1" to the URL, or by just being logged into the
> typo3 backend - extremely helpful during debugging and development.
> When an extension relied on the normal typo3 content caching
> mechanism, development was easy.
> 
> Now when using the caching framework, none of those triggers disable
> the cache.
> My question is: Shall I implement those triggers myself, again and
> again in each extension, or is there a API function that tells me if I
> should disable the cache? Maybe even an option in the caching
> framework itself, "listenToNoCacheTriggers"?
Nobody answered yet, so I guess there is no standard way to do it.


> If I need to implement it myself: Is there a complete list of all
> those former triggers?

I'm doing it manually now and check if the backend user is logged in OR
the no_cache parameter is set:
> $useCache = $GLOBALS['BE_USER']->user == null
>     && !isset($_REQUEST['no_cache']);

Maybe it helps someone.

-- 
Viele Grüße
Dipl.-Inf. Christian Weiske

Senior Developer
Netresearch GmbH & Co. KG





More information about the TYPO3-dev mailing list