diff options
Diffstat (limited to 'includes/cache.inc')
-rw-r--r-- | includes/cache.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/includes/cache.inc b/includes/cache.inc index babf33f55..460903913 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -198,7 +198,7 @@ function cache_is_empty($bin) { * DrupalCacheInterface was called MyCustomCache, the following line would make * Drupal use it for the 'cache_page' bin: * @code - * variable_set('cache_page', 'MyCustomCache'); + * variable_set('cache_class_cache_page', 'MyCustomCache'); * @endcode * * Additionally, you can register your cache implementation to be used by @@ -208,6 +208,17 @@ function cache_is_empty($bin) { * variable_set('cache_default_class', 'MyCustomCache'); * @endcode * + * To implement a completely custom cache bin, use the same variable format: + * @code + * variable_set('cache_class_custom_bin', 'MyCustomCache'); + * @endcode + * To access your custom cache bin, specify the name of the bin when storing + * or retrieving cached data: + * @code + * cache_set($cid, $data, 'custom_bin', $expire); + * cache_get($cid, 'custom_bin'); + * @endcode + * * @see _cache_get_object() * @see DrupalDatabaseCache */ |