[Typo3-dev] Clear Cache

Lars Houmark lars at houmark.com
Sat Apr 2 12:00:11 CEST 2005


Hi Bernhard,

Thanks for your reply. Please have a look at my answer to my own post as 
well ;)

I will be looking further into you method, but i also would like to raise a 
suggestion for the cache clear command. When having a plugin with MANY 
records in fx. one sysfolder, it is rather unsmart that it's needed to clear 
the entine cache for that folder (along with the pages for viewing the 
plugin data) just when updating one single record. Figure a scenario where a 
customer is updating their records several times a day, this makes the load 
unnessesary big, because 99% of the records needs to be regenerated, even 
though they haven't changed. A method for passing along another ID for the 
clear cache command, would make it only clear the cache for the records 
implicated in the update.

Am I way off? Anyone see my point?

Regards,

Lars Houmark

"Kraft Bernhard" <kraftb at kraftb.at> wrote in message 
news:mailman.1.1112435528.22523.typo3-dev at lists.netfielders.de...
> Lars Houmark wrote:
>
>> Can anybody point me in the direction on how to clear some or all pages 
>> in the cache, directly from the "mod" index.php script?
>
> I do:
>
> --------------snip---------------------
>          $tce = t3lib_div::makeInstance('t3lib_TCEmain');
>          $tce->admin = 1;
>          $tce->clear_cacheCmd('pages');
>          header('Location: 
> '.t3lib_div::linkThisScript(array($this->prefixId => '', 
> $this->prefixId.'[showUid]' => $new_id)));
> --------------snip---------------------
>
> in one of my FE-scripts ... don't know if it will work for a BE script. 
> I'm also curious.
>
> And what I would also like to know is how to clear the cache of single 
> pages ...
>
> I do not really like the idea of clearing the complete page cache whenever 
> a user
> uploads a record.
>
>
>
> greets,
> Bernhard 






More information about the TYPO3-dev mailing list