diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-11-05 19:50:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-11-05 19:50:11 +0000 |
commit | 4a110ab715d6a98f8ec46944071df484b8feb062 (patch) | |
tree | 19152eea228d472916dcafff455bbb2dc8744ec7 /includes | |
parent | ae85abb9833e0600afa0595a912be8065f8bccab (diff) | |
download | brdo-4a110ab715d6a98f8ec46944071df484b8feb062.tar.gz brdo-4a110ab715d6a98f8ec46944071df484b8feb062.tar.bz2 |
- Patch #889366 by Kevin Hankens, jhodgdon: error in DrupalCacheInterface documentation .
Diffstat (limited to 'includes')
-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 */ |