Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.7. Configuration

Install tool / localconf.php

enetcache is based on the new caching framework of TYPO3 4.3, which is not enabled by default. To enable the caching framework set this variable either via the install tool or directly in your typo3conf/localconf.php:$TYPO3_CONF_VARS['SYS']['useCachingFramework'] = '1';

Extension manager

The extension manager provides a configuration option to set the default lifetime of a cache entry if none was given in a set() call. Default lifetime is 86400 seconds (1 day). This is a fallback setting, we recommend to add configuration settings to your plugins to set cachetimes on TypoScript and / or FlexForm level.

Compressed database backend

Enetcache provides a new cache backend based on the current database backend delivered with TYPO3 4.3. In contrast to the existing db backend it gzip's the content to save db space. This will speed up things for big cache tables. You need core patch #12858 applied! Furthermore we recommend to apply core patch #13273 You can use the backend by setting those parameters in your localconf.php:

$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_enetcache_contentcache'] = array(    'frontend' => 't3lib_cache_frontend_StringFrontend',    'backend' => 'tx_enetcache_cache_backend_CompressedDbBackend',    'options' => array(        'cacheTable' => 'tx_enetcache_contentcache',        'tagsTable' => 'tx_enetcache_contentcache_tags',    ), );

You could also use this backend for other cache tables (we recommend cache_pages), remember to set the content field of the cache table to “mediumblob” instead of “mediumtext” to make this work!

Scheduler task

The extension comes with a scheduler task to run a garbage collection of old entries in the caching framework that passed their lifetime. This is useful for cache backends that do not come with an automatic garbage collection. Current backends without built in garbage collection are dbBackend fileBackend, while memcached does it interally.

Depending on your configuration we recommend to run this task at least once a day when the load on a system is low (probably at night) for all configured backends types that need this garbage collection. The task walks through all configured caches and calls the garbage collection if a cache uses one of the chosen backends.

In future we will try to implement this task in TYPO3 core, but unfortunatly feature freeze for 4.3 was already in effect when it was written. See http://bugs.typo3.org/view.php?id=12563 for more information.

Example configuration of garbage task: