Menu


Caching

TYPO3 uses caching in order to improve the performance and the responsiveness of the website.

Table of contents



Enabling cache


Caching is activated by default in any TYPO3 instance.

Cache for exact period of time


One can set the page cache to expire after a certain amount of time. To do this there are two possiblities

  1. The period can be set from the page properties in the backend
  2. The period can be set from Typoscript with : config.cache_period = xxxx where xxxx is the number of seconds between two automatic clear cache operations

Disabling cache


Cache can be disabled in the following ways

  • Making an object COA_INT? - this way that particular object will not be cached but the other content on the page will be cached.
  • Adding &no_cache=1 to the URL when accessing the site
  • Checking the No Cache checkbox in the page properties
  • using the TYPO3 API command
    $GLOBALS['TSFE']->set_no_cache()
    in one of the extensions that run on the page. By using this command the whole caching on that page is disabled.
  • Caching can be deactivated for particular pages by checking the No Cache checkbox in the page properties (in the backend)

What is cached


For performance reasons TYPO3 will cache lots of things. For example:

  • Typoscript templates
  • The HTML output of static pages
  • Configuration settings
  • The thumbnails of the files from the fileadmin directory that can be displayed in the Filelist? module

Where is cached


TYPO3 saves the cache by default into the cache_* tables.

As of TYPO3 4.2? this behavior can be changed if the option pageCacheToExternalFiles? is used. This can be set from the Install Tool or from localconf.php to save the cached pages to the typo3temp / cache_pages? directory:


$TYPO3_CONF_VARS[FE][pageCacheToExternalFiles] 



Further reading


Allow users to clear cache
Automatically clear cache after editing records





Google Search

 
wiki.lacisoft.com
WWW
2009-2011 (c) Lacisoft.com