[TYPO3-mvc] no cache for development?
Steffen Kamper
info at sk-typo3.de
Tue Aug 18 11:17:00 CEST 2009
Steffen Kamper schrieb:
> Christoph Koehler schrieb:
>> On 8/17/09 3:21 AM, Steffen Kamper wrote:
>>> Hi,
>>>
>>> Christoph Koehler schrieb:
>>>>
>>>> Okay, let me ask this: I have a controller that deletes and adds
>>>> records. Due to caching, if I delete a record, it still shows until I
>>>> clear all cache in the BE and reload; then the record is gone from the
>>>> markup. That is clearly undesirable and not just for development.
>>>>
>>>> How do I disable caching in that scenario?
>>>>
>>>
>>> there is a need to clear the cache for this records. Cache calls are
>>> possible without instancing anything as the caching framework is in
>>> GLOBALS. Try to figure out the right calls, look at tcemain how it's
>>> called.
>>
>> Could you be more specific please?
>>
> what is unspecific when looking to tcemain?
>
> $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
> $pageSectionCache =
> $GLOBALS['typo3CacheManager']->getCache('cache_pagesection');
> $pageCache->flushByTag('pageId_' . $pageId);
> $pageSectionCache->flushByTag('pageId_' . $pageId);
>
>
> vg Steffen
or even more easy:
t3lib_TCEmain::cacheHandler('pages', 112, 'update');
vg Steffen
More information about the TYPO3-project-typo3v4mvc
mailing list