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

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Sep 23 17:28:00 CEST 2008


Martin Kutschker wrote: on 23.09.2008 15:54:

>>> I cannot think of any reliable way to get to that data. Simply taking
>>> all records into account is easy but not necessarily correct.

>> In CONTENT and RECORD it might be "easy", simply execute the same query
>> we already make twice, once with enableFields and once without
>> start/endtime filtering. Use the first one for rendering, the second one
>> for looking up cache expiration.

> I actually thought about doing a query without any limit execept
> "deleted=0" and do the processing in PHP from the start, so you need
> only one query. IMHO we shouldn't burden the DB server with more queries
> for rare edge cases - clear cache at midnight is good enough for many sites!

I would love to get rid of clear cache at midnight per default and have
the clearing happen always only when needed. Will probably stress the
mysql server even less, as most pages are really "static" and never
change. :)

The most common requirement we get from customers on that matter is to
have a way to publish some content with minute-precision (e.g. 8am),
which is not possible with clear-cache-on-midnight.

Using one query and filtering starttime/endtime stuff on PHP might be an
easy approach to the problem. Should be doable.

>> Cache expiration needs to propagate down the cObject hierarchy, so that
>> the top level cObject (e.g. the "PAGE" object) has information based on
>> all objects below it (for example a TEMPLATE, which includes a COA,
>> which might include an USER and a CONTENT, etc).
> 
> Why add some extra hoops? This is the task of TSFE. I don't see why the
> simple but effective way the last-generated info is collected isn't good
> enough for the caching time. No need to pass infos around in
> hierarchies, stacks or whatever.
> 
>> I can imagine that a OO-based framework could provide very good new
>> concepts for the already great TypoScript and "cObject" concept, see below.
> 
> This will change very much and is beyond the scope of this thread.

I know, the scope was somehow expanded to per object caching (mea
culpa). At that moment it would be important to know cache expiration
times also for "subparts" of the rendering process.

But you are right that we only need one "global" minimum expiration time
for a cache entry if we only cache a page as a whole (which is what
current TYPO3 caching can handle anyway).

My point of view was that if per object caching was being dealt with
anyway, as it was planned for 4.3, that concept should/coult be
integrated there. But I am not sure if anyone is doing any work on that
matter (Oli, Stucki, any feedback on that?).

So in the meantime, if Martin Holtz is still listening, I would suggest
that he looks into cObject function CONTENT and function RECORDS and see
if he manages to find a way to get the idea working. And also HMENU and
its kids would need to be included in the soup, because they can also
include pages that have starttime somewhere in some future mid-day.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list