[TYPO3-core] RFC #9284: Feature: tt_content.starttime/endtime have now effect on caching

Martin Holtz typo3 at martinholtz.de
Wed Sep 3 22:53:23 CEST 2008


This is an SVN patch request.

Type: Feature (or Bug, i am not sure)

Bugtracker references:
http://bugs.typo3.org/view.php?id=9284

Branches:
TYPO3_4_TRUNK

Problem:
Page Cache is generated today at 10.00,
without other configuration page cache is valid until tomorrow 10.00
if an content element on that page has starttime today 11.00, it will shown
up on that page tomorrow at 10.00

When TYPO3 looks up if there is a cache entry, it makes a join with pages
and cache_pages. So starttime and endtime etc of pages has an effect. But
tt_content or other elements not. I thought the best way is not to change
that query, but to change expire timestamp of the cache entry.

Solution:
before writing page cache with expire timestamp, we look up on that page, if
there is a content element which has an starttime or an endtime withing
today 10.00 and tomorrow 10.00. If there is one, the page expire timestamp
will set to that timestamp.
I added an hook too, so someone could check it for tt_news elements too...

Notes:
i wrote an extension as proof on concept, it is available in ter and on
forge: cacheexpire, there i wrote an simple test, how it could work for
tt_news

thanks for reading:)
martin


More information about the TYPO3-team-core mailing list