[TYPO3-core] RFC: Feature Request 5424: Menu cache expire time should be configurable

Oliver Hader oh at inpublica.de
Mon Apr 23 09:54:25 CEST 2007

Hi Masi,

Martin Kutschker wrote:
> Oliver Hader schrieb:
>> This is a SVN patch request.
>> Problem:
>> On line 839 in class.tslib_menu.php the caching timeout is hardcoded:
>> $serData = $this->sys_page->getHash($this->hash, 60*60*24);
>> Solution:
>> Integrate a new TypoScript property to the HMENU object to make this
>> configurable. If this property is not set, the value is taken from the
>> cache_timeout of the current page. If this is also not available, the
>> value is taken from global config.cache_period. And finally, if nothing
>> was set, the value of 86400 seconds (= 1 day) is used.
>> Documentation changes:
>> In doc_core_tsref, section HMENU, before property "entryLevel":
>> The number of seconds a menu may remain in cache. If this value is not
>> set, the first available value of the following will be used:
>> 1) cache_timeout of the current page
>> 2) config.cache_period defined globally
>> 3) 86400 (= 1 day)
> Ok, but... get_cache_timeout() has no return statement.

Of course, I'll fix this.

> And please make it getCacheTimout() - or should it be getCachePeriod? -
> to follow the naming convention of tslib_fe and tslib_menu.

There was already a function tslib_fe::set_cache_timeout_default(...)
and I kept this also for the function get_cache_timeout(). But no
problem with changing it to getCacheTimeout().

> PS: Why is it page.cache_timeout but config.cache_period?

"cache_timeout" is the fieldname of table pages. "cache_period" is a
TypoScript property. I don't know why this is different.

If there are no more comments/requests to the patch, I'll send the fixed
version (including the return value) today.

Oliver Hader

More information about the TYPO3-team-core mailing list