Attention
TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is strongly recommended updating your project.
Quick start for Integrators¶
This section gives come simple instructions for getting started with using the caching framework without giving the whole details under the hood.
Change specific cache options¶
By default, most core caches use the database backend. Default cache configuration
is defined in typo3/sysext/core/Configuration/DefaultConfiguration.php
and can be overridden in LocalConfiguration.php
.
If specific settings should be applied to the configuration, they should be added to LocalConfiguration.php
.
All settings in LocalConfiguration.php
will be merged with DefaultConfiguration.php
. The easiest way to see
the final cache configuration is to use the TYPO3 Backend module Admin Tools > Configuration > $TYPO3_CONF_VARS.
Example for a configuration of redis cache backend on redis database number 42 instead of the default database backend with compression for the pages cache:
return array(
...
'SYS' => array(
...
'caching' => array(
...
'cache_pages' => array(
'backend' => 'TYPO3\CMS\Core\Cache\Backend\RedisBackend',
'options' => array(
'database' => 42,
),
),
),
),
);
Garbage collection task¶
Most cache backends do not have an internal system to remove old cache entries that exceeded their lifetime. A cleanup must be triggered externally to find and remove those entries, otherwise caches could grow to arbitrary size. This could lead to a slow website performance, might sum up to significant hard disk or memory usage and could render the server system unusable.
It is advised to always enable the scheduler and run the "Caching framework garbage collection" task to retain clean and small caches. This housekeeping could be done once a day when the system is otherwise mostly idle.