[TYPO3-dev] pagecache does not respect starttime / endtime of the page

Roland Hager roland.hager at tu-berlin.de
Mon May 30 16:20:10 CEST 2011


hello,

an editor reclaimed that a page he liked to publish at a specified time 
(via Access tab) actually did not appear when time comes up.

I had a look at the code and noticed that, when using the caching 
framework, as long as the cache does not times out itself there will be 
no check if it got invalid due to starttime / endtime.
So the cacheTimeOut ist set to 86400s (if using the default) even though 
the page should be hidden in 5 minutes. A normal user will than get the 
cached page even if trying to "shift+reload" it and an editor has to 
clear the cache for that page.

I thought about it and found it a good idea to reduce the cacheTimeOut 
so it will respect the start/stoptimes of the page and the tt_content 
elements it contains. This means one additional query when creating the 
cache - that's it.
Yes I'm aware of various other content elements like "insert records" 
that will still be not respected but "normal content elements" should 
cover most cases.

The tested patch is attached. I would be glad if someone could have a 
look at it. Feel free to point out performance or other issues.

Best regards
Roland Hager


More information about the TYPO3-dev mailing list