[TYPO3-project-4-3] changing the page cache to use the new caching framework

Ingo Renner ingo at typo3.org
Mon Sep 15 21:42:58 CEST 2008


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?


Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-project-4-3 mailing list