[TYPO3-english] tx_comments and caching of tt_news

Dmitry Dulepov dmitry at typo3.org
Mon Jan 12 22:27:46 CET 2009


Hi Frank!

Frank Sonck wrote:
> But the manual says:
> 
> Automatically clear cache for any page(s) when comment is added
> 
> Now if I have 1000 articles, all of them already visited at least one
> time and thus already cached (this is 1000 cached views of my article
> page), adding a new comment for 1 article would mean that I 'lose' these
>   1000 cached views? This would seem like wasted work for the server and
> another performance killer?
> 
> Does anyone have an answer for this?

There are two possible scenarios here.

* If articles are all on the *same TYPO3 page* (for example, shown by extension like tt_news), than the cache for all 1000 articles will be cleared. TYPO3 (until version 4.3) does not have the API to clear cache for the given article. It is always the page when cache is cleared. There is absolutely no other way :( But it is still better than preventing page cache completely because regenerating page once is nothing when compared to generating it on each visit. So you always win with comments extension.

* If articles are on *different TYPO3 pages* (for example, normal pages), only cache for that single page/article will be cleared. Other articles will stay cached.

Comments 2.0 will try to do even better with cache but it will require 4.3 for advanced cache management and will fallback to current logic with TYPO3 < 4.3. But this version is in development and it is unclear when it will be out because it is developed in the spare time.

-- 
Dmitry Dulepov
TYPO3 core team

Mr. Harris: People say that you were the last person to speak with Jordon...
            Is that true? 
Cameron: I don't know. Are you asking me if people say I was the last person
            to talk to Jordon? Or are you asking me if I was the last person
            to talk to her? 
Mr. Harris: I guess I'm asking if you were. 
Cameron: I don't know. 


More information about the TYPO3-english mailing list