You are here

README.txt in Cache Object API 7

Cache Object API
================

This module provides a cache class exposing hooks allowing other code to
intercept calls to the caching layer. by implementing those hooks it is
possible to alter expiry before an object is saved to the database or to
prevent a cache flush under some condition.

Installation
------------

In order to expose the cache object hooks only for the cache_form bin, put the
following lines into your settings.php:

    # Include the Cache Object API Wrapper as a cache backend
    $conf['cache_backends'][] = 'sites/all/modules/cacheobject/cacheobject.inc';
    
    # Set the cache class for the form cache to 
    $conf['cache_class_cache_form'] = 'CacheObjectAPIWrapper';
    
    # Optionally set the underlying cache class
    $conf['cacheobject_class_cache_form'] = 'DrupalDatabaseCache';

When the underlying cache class is not specified, the cache object wrapper falls
back to $conf['cacheobject_class'] and if that does not exist to
$conf['cache_class'] and finally to DrupalDatabaseCache.

File

README.txt
View source
  1. Cache Object API
  2. ================
  3. This module provides a cache class exposing hooks allowing other code to
  4. intercept calls to the caching layer. by implementing those hooks it is
  5. possible to alter expiry before an object is saved to the database or to
  6. prevent a cache flush under some condition.
  7. Installation
  8. ------------
  9. In order to expose the cache object hooks only for the cache_form bin, put the
  10. following lines into your settings.php:
  11. # Include the Cache Object API Wrapper as a cache backend
  12. $conf['cache_backends'][] = 'sites/all/modules/cacheobject/cacheobject.inc';
  13. # Set the cache class for the form cache to
  14. $conf['cache_class_cache_form'] = 'CacheObjectAPIWrapper';
  15. # Optionally set the underlying cache class
  16. $conf['cacheobject_class_cache_form'] = 'DrupalDatabaseCache';
  17. When the underlying cache class is not specified, the cache object wrapper falls
  18. back to $conf['cacheobject_class'] and if that does not exist to
  19. $conf['cache_class'] and finally to DrupalDatabaseCache.