Setting up external cache model

by Peter D.

Setting up external cache model

Using Magento local.xml file

This method will change the cache model for the whole website. The following settings will be applied to every block and collection.

  1. Open app\etc\local.xml and app\etc\local.xml.additional
  2. Copy settings that you would like to change from app\etc\local.xml.additional to app\etc\local.xml
  3. Enter the cache configuration according to your cache
  4. Save the file
  5. Clear the cache in a backend panel or delete all contents of the cache directory

Using tmcache.xml file

This method will change the cache model for TM_Cache module only.

  1. Rename app\etc\tmcache.xml.sample to app\etc\tmcache.xml
  2. Enter the cache configuration according to your cache
  3. Save the file
  4. Clear the cache in a backend panel or delete all contents of the cache directory

Using the Cm_Cache_Backend_File

Much improved replacement for Zend_Cache_Backend_File by Colin Mollenhour

  1. Copy the File.php to app/code/community/Cm/Cache/Backend/File.php
  2. Open app/etc/tmcache.xml and change global/tmcache/backend entry to Cm_Cache_Backend_File
  3. Clear the cache in a backend panel or delete all contents of the cache directory

When the cache is automatically refreshed

Following rules are used:

  • Category save triggers in order to clear all cache from the top navigation, that appears across all site pages
  • Product changes triggers invalidation of product, quickshopping and related category pages
  • CMS page changes will update cms page URL only. The Home page will be updated too, if changed page is set as homepage
  • Product review triggers the refreshing of review, review listing, related product and category pages
  • Product Tag changes cause the refresh of the product and related tag list pages
  • CatalogRules update triggers invalidating of related product and category pages
  • New Order invalidates the purchased product pages

Automatic cache updating can be disabled at System/Configuration/TM/Cache/General options. In this case you will be notified about cache invalidating, when one of the supported events will occur.

Recent articles

Back to top