Project

General

Profile

Actions

Bug #23718

closed

The default lifetime of the cache has a wrong value and can not be changed

Added by Dimitri about 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-10-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The variable $defaultLifetime is set to 3600 instead of 0 (like documentated) in the t3lib_cache_backend_AbstractBackend class.

This value can not be changed when creating a t3lib_cache_frontend_StringFrontend or t3lib_cache_frontend_VariableFrontend object.

(issue imported from #M15975)

Actions #1

Updated by Steffen Kamper about 14 years ago

this is not correct

$this->backend->setDefaultLifetime(10000)

Actions #2

Updated by Dimitri about 14 years ago

it can only be used from a t3lib_cache_backend_xx object

so like i have said, if usind a t3lib_cache_frontend_xx class the backend variable is protected

$cache->backend->setDefaultLifetime(10000) doesnt work from a frontend cache class

Actions #3

Updated by Christian Kuhn almost 14 years ago

According to test theConstructorCallsSetterMethodsForAllSpecifiedOptions() in tests/t3lib/cache/backend/t3lib_cache_backend_abstractbackendTest.php it should be possible to configure something like:

$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'] = array(
'foocache' = array(
'frontend' => 't3lib_cache_frontend_VariableFrontend',
'backend' => 't3lib_cache_backend_DbBackend',
'options' => array(
'defaultLifetime' = 123,
),
),
);

Could you please confirm? Does this solve you issue?

Actions #4

Updated by Christian Kuhn almost 14 years ago

Resolved, no change required:

The default cache time can be set with a localconf.php setting for any cache.

See http://wiki.typo3.org/Caching_framework for details.

Actions #5

Updated by Carsten Bleicker over 13 years ago

i wonder why my page is so slow after 1 hour.
seems to be the defaultLifetime of extBase extension cache.
this one will build a lot of stuff in its own tables and i want this cache by default unlimited.
but if i try to change the defaultLifeTime for both extBase Cache tables it only changed on one of them, not both:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_extbase_object']['options']['defaultLifetime'] = 0;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_extbase_reflection']['options']['defaultLifetime'] = 0;

after this change in ext_tables.php the records in the database has the following lifeTime:
cache_extbase_reflection => 0
cache_extbase_object => 3600

why cache_extbase_object has still the default value?

thank you
carsten

Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF