[Typo3-dev] Clear Cache

Lars Houmark lars at houmark.com
Mon Apr 4 11:51:01 CEST 2005


Hi Kasper,

Thanks for your reply.

> On typo3.org we had the same problem: The documentation page would
> (and does...) contain thousands of cached instances of the same page.
> So when I made that I introduced the "reg1" field to the cache_pages
> table. The idea was that FROM AN EXTENSION you can set the value of
> "reg1" (for instance to the uid of a tt_news record) and it will be
> stored with the cache version of that record display. That means now
> the page cache could be flushed with "WHERE page_id=[page] AND
> reg1=[uid of tt_news record]".

Very nice! I had my thoughts about the reg1.

> So, *somewhere* in TSFE object you should find an internal variable
> which - if set from your extension - will be stored with the cached
> page. And from your "mod" script you can now flush the cache with this
> in mind.

I will look into the documentation and see if I can find the correct way to 
handle this. It's surely worth spending some time on ;)
I have one other question though. In this current scenario, I've made a 
"mod" script. But for another extension I have a regular backend list of 
records in a sysfolder and editing records is the "normal" way, using the 
TYPO3 core. I made a TS-Config adjustment to the sysfolder holding the 
records, which clears the cache for the pages showing the records. Now I am 
curious to know how I can use the reg1 to make sure, that only the pages 
showing the updated record is being flushed from the cache?

> However: I need to create an API by which you can flush the page cache
> with a function call rather than homemade SQL. This is not fully ready
> yet (except from what Bernhard has pointed out).
>

I think this is a very good idea, as the cache engine might change in 
structure, and that would make my and several other extensions become not 
working.

Regards,


Lars Houmark 






More information about the TYPO3-dev mailing list