[TYPO3-core] FYI72: #11145: Starttime/endtime is not taken into account when caching
Rupert Germann
rupi at gmx.li
Mon Jun 8 17:24:06 CEST 2009
oops, forgot a debug line.
intval($GLOBALS[__FUNCTION__.....
cleaned patch attached
greets
rupert
Rupert Germann wrote:
> hi Dmitry
>
> I looked over your patch and found one little issue: if
> cache_clearAtMidnight is set there's executed quite a lot of code to get
> the first startime/endtime but later cache_clearAtMidnight overwrites this
> value again.
>
> attached is version v3 of the patch where I moved the
> cache_clearAtMidnight code from realPageCacheContent() to function
> get_cache_timeout(). calculatePageCacheTimeout() is now only executed when
> cache_clearAtMidnight is not set.
>
> I also moved the internal caching var one level higher in function
> hierarchy and I used $GLOBALS['ACCESS_TIME'] instead of $now =
> 60*(time()/60 - 1);
>
> Although it's not yet perfect (f.e. it doesn't take concepts like
> pidList/recursive into account) the patch works great and should be part
> of 4.3 asap.
>
> greets
> rupert
>
> PS: yes, I know that EXEC_TIME is is added and subtracted several from
> $cacheTimeout -> I will investigate/fix this in a follow up.
>
>
>
> Dmitry Dulepov wrote:
>> Hi!
>>
>> Dmitry Dulepov wrote:
>>> BT reference: http://bugs.typo3.org/view.php?id=11145
>>
>> v2 of the patch adds caching for the calculated value to avoid its
>> recalculation when the function is called many times. It also adds a new
>> "all" option. This option is useful, for example, when tt_news (or other
>> records) are shown on each page (i.e. cache time of each page depends on
>> records from the table).
>>
More information about the TYPO3-team-core
mailing list