Project

General

Profile

Actions

Feature #17209

closed

Menu cache expire time should be configurable

Added by John Angel over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-04-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

It should be possible to define expire time of menu cache:

class.tslib_menu.php:839
$serData = $this->sys_page->getHash($this->hash, 60*60*24);

Should be implemented similar to this:
$serData = $this->sys_page->getHash($this->hash, ($this->conf['expireDays']?$this->conf['expireDays']:30)*24*3600);

Default time should be 30 days.

(issue imported from #M5424)


Files

0005424.patch (2.63 KB) 0005424.patch Administrator Admin, 2007-04-17 14:36
Actions #1

Updated by Oliver Hader over 17 years ago

Have a look to the attached patch file. It's possible to define the cache_period via TypoScript in the HMENU object, e.g.

10 = HMENU
10 {
cache_period = 86400
special = directory
...
}

The name [HMENU].cache_period works similar to config.cache_period. It indicates the number of seconds the menu may remain in cache.

Actions #2

Updated by John Angel over 17 years ago

So it will first look for
1) current page cache timeout, then
2) for config.cache_period, and then
3) [HMENU].cache_period?

Actions #3

Updated by Oliver Hader over 17 years ago

No, more like this:
1) [HMENU].cache_period
2) current page cache_timeout
3) global config.cache_period
4) if none of the above: 86400 = 1day

Thus, from specific to general.

Actions #4

Updated by John Angel over 17 years ago

Nice work Oliver, that's it! :)

Actions #5

Updated by Oliver Hader over 17 years ago

Committed to Trunk

Actions

Also available in: Atom PDF