[TYPO3-core] FYI72: #11145: Starttime/endtime is not taken into account when caching

Rupert Germann rupi at gmx.li
Wed Jun 10 00:46:45 CEST 2009


hi Dmitry

Dmitry Dulepov wrote:
> Rupert Germann wrote:
>> if there's something special about the line "$now = 60*(time()/60 - 1);"
>> that I didn't get until now, please enlighten me - or commit the patch
>> with this line - I don't really care.
>> But then you should remove "...(do not polute MySQL cache!)" from the
>> comment, because with  60*(time()/60 - 1) the time value in the query
>> will change every second == poluting the query cache with lots of
>> entries.
> 
> It rounds up the cache expiration time to the next minute. This way it
> creates less entries in the MySQL query cache.

no and no.

if I put this in my command line:

php -r 'echo 60*(time()/60 - 1).chr(10);'

And hit enter I get a value that changes every second.

If I enter this to the command line:

php -r 'echo time()-(time()%60).chr(10);' 

I get a value that changes every minute.
And that is exactly what is written to ACCESS_TIME

greets
rupert



More information about the TYPO3-team-core mailing list