DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Caching Framework Lifetime Patch

Created:2010-02-18T17:33:18
Changed by:Sven Tappert
Changed:2013-08-02T17:46:28.830000000
Classification:cf_lifetime_patch
Keywords:caching framework
Author:Sven Tappert
Email:typo3@sven-t.de
Info 4:
Language:en

img-1 img-2 EXT: Caching Framework Lifetime Patch - cf_lifetime_patch

EXT: Caching Framework Lifetime Patch

Extension Key: cf_lifetime_patch

Language: en

Keywords: caching framework

Copyright 2013, Sven Tappert, <typo3@sven-t.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: Caching Framework Lifetime Patch 1

`Introduction 3 <#__RefHeading__706_179464138>`_

What does it do? 3

Screenshots 3

`Users manual 4 <#__RefHeading__712_179464138>`_

`Administration 5 <#__RefHeading__2694_623485719>`_

`Configuration 6 <#__RefHeading__720_179464138>`_

FAQ 6

Reference 6

`Known problems 7 <#__RefHeading__728_179464138>`_

`ChangeLog 8 <#__RefHeading__732_179464138>`_

Introduction

What does it do?

The cache lifetime in the “new” caching framework (it was introduced in typo3 version 4.5) currently sets a default timestamp of 3600 seconds (1 hour) for the pagesection cache and the rootline cache (Typo3 Version 6.0).

This might be correct, but for some reason the whole page cache is rendered again after the pagesection cache expires (the rootline cache does seem to have a big effect). This is absolutely independent from the TypoScript setting config.cache_period. This leads to a cache timeout and regeneration for every page after one hour, disabling the cache_period configuration more or less and producing heavy extra load on the server.

This extension sets the lifetime of these two caches to unlimited (default) or to some user defined value. So the caches are only getting regenerated when the page cache times out, the frontend cache is cleared or the configured lifetime expires. Please note, that this is just a (good working) fix but it does not resolve the bug in the caching system itself.

This patch addresses issues http://forge.typo3.org/issues/39295 and http://forge.typo3.org/issues/50231

Note:

From version 1.2.0 this extension just (re)sets the configuration values for the caching framework cache lifetimes in:$GLOBALS['TYPO3_C ONF_VARS']['SYS']['caching']['cacheConfigurations'][<CACHE_NAME>]['o ptions']['defaultLifetime']

This could be also done manually in typo3conf/AdditionalConfiguration.php (Typo3 6.x.) or in typo3conf/localconf.php (Typo3 4.x)

Screenshots

img-3

The extensions configuration settings. Set the cache lifetime in seconds. The default value (unlimited cache lifetime = 0) is currently the recommended setting.

Users manual

It just needs to be installed. Default configuration will work. If you experience a never expiring cache (i.e. cache persists longer than configured in TS setup) set this to the same value as in TS setup (config.cache_period).

Administration

The extension needs to be installed and will work.

Clear the whole typo3 cache if you want to make sure the that the caches are regenerated with the new expiry timestamps.

If you want to change the cache lifetime, you can use the extension configuration page. It's accessible via the extension manager.

Configuration

The extension does not provide or need any TS templates to be included or any TS Setup at all.

Cache lifetimes, can be set on the general extensions configuration. It's accessible via the extension manager.

The default value (0 = unlimited cache lifetime) is currently the recommended setting for both caches. Alternatively you can use the same value as in the TS setup for config.cache_period.

The rootline cache only affects Typo3 versions 6.0 and above.

FAQ

  • Is it useful to set the lifetime to another value than zero? - To be honest: I don't know yet...
  • Are there any problems with unlimited cache lifetimes for pagesections and rootline? - As far as I can say, it's the perfect value for these caches. The cache will be regenerated when the correspondent page cache expires or the cache is cleared. To be really, really honest: see above.. if you experience any strange behavior, please let me know!In case of doubt use the same value as in your TS setup (config.cache_period).

Reference

Extension configuration (extension configuration via the extension manager, no TS Setup)

pagesection_cache_period

Property

pagesection_cache_period

Data type

int+

Description

Cache lifetime in seconds for pagesection cache.

“0” sets expiry to unlimited. Empty value “” restores the default system lifetime (3600 in current typo3 branches).

Default

0

rootline_cache_period

Property

rootline_cache_period

Data type

int+

Description

Cache lifetime in seconds for rootline cache. This cache is not used in typo3 versions of the 4.x branch.

“0” sets expiry to unlimited. Empty value “” restores the default system lifetime (3600 in current typo3 branches).

Default

0

Known problems

Nothing yet, but:

  • XCLASS usage was removed in version 1.2.0. The extension now just manipulates the config values for the cache lifetimes.So if you configured them manually these values will be overridden.
  • If you experience any problems, please let me know.

ChangeLog

1.2.1

Version

1.2.1

Changes

Extension description update.

1.2.0

Version

1.2.0

Changes

Removed XCLASS and Hook usage. The extension now just manipulates the config settings.

1.1.2

Version

1.1.2

Changes

Added the manual and – the extension ICON!

1.1.1

Version

1.1.1

Changes

Modified version dependency information

1.1.0

Version

1.1.0

Changes

Added patches for 4.5, 4.6 and 4.7

1.0.0

Version

1.0.0

Changes

First release. Patch for typo3 6.x branches

img-2 8