[Typo3-dev] Clear Cache
Kasper Skårhøj
kasper2005 at typo3.com
Mon Apr 4 11:40:14 CEST 2005
Hi Lars,
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]".
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.
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).
- kasper
On Sat, 2005-04-02 at 12:46, Lars Houmark wrote:
> > What do you mean by "many records within one page id" ?
>
> I have a plugin on page id 9, in the cache table there's multiple cache
> records of that page id, as every single record assosiated with that page
> gets its own cache record. This is very nice!
> But, when one of those records is updated, I can only configure that backend
> to clear the cache for ALL the cache records with the id 9. That is
> overkill. That means all the records have to be regenerated for the cache
> and completely not needed.
>
> Are you with me know? If not, try having a look at an installation, with fx.
> tt_news or another plugin (that can cache records) with records assosiated
> with a page id. Have a look at the table 'cache_pages' in the mysql. There a
> multiple records there, with different hash keys. I should believe the hash
> key has the information about the querystring or the record id's to make the
> cache engine multilevel threaded.
>
> Regards,
>
> Lars Houmark
>
>
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
--
- kasper
*******************
Happy new year! - My email address is now:
kasper2005 at typo3.com
More information about the TYPO3-dev
mailing list