[TYPO3-project-4-3] changing the page cache to use the new caching framework
Martin Kutschker
masi-no at spam-typo3.org
Wed Sep 17 22:57:38 CEST 2008
Ingo Renner schrieb:
> Hi all,
>
> now that t3lib_cache is in trunk I had the idea to change the existing
> page cache to use the new framework.
>
> biggest con though:
> * it would break backwards compatibility
>
> pros:
> * way more flexible
> * easier to use
> * (maybe / depending on the chosen cache backend) faster
> * we would have tags on the cache entries
>
> especially the thing with the tags got me some nice ideas:
>
> After moving to the new system it would dramatically easier for people
> to "tag" pages in their extensions. with whatever tags they want and
> clear those cache entries whenever their extension needs to. This would
> make the system way more flexible and more dynamic
>
> Example:
> a page showing a list of tt_news records in a list view. tt_news could
> go and add tags in a way like this:
>
> // tt_news_X are the records shown on that page
> $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3');
>
> Then there could be another plugin X on the same page that also tags the
> page:
>
> $TSFE->page->addTags('tx_X_someTag, tx_X_someOtherTag');
>
> And of course the core would tag the page with stuff we already have
> like the cHash:
>
> $TSFE->page->addTags('core_cHash_######');
>
> Looking up and clearing pages by tag is then quite easy using
> t3lib_cache...
>
>
> Any comments?
Interesting.
May an extension/plugin also modify the cache expiry time? Let's say the
page starts with the default of 24 but the news plugin for a some site
thinks 2 hours is enough then it could change the value on-the-fly (only
reduce, never extend).
Masi
More information about the TYPO3-project-4-3
mailing list