From 4a110ab715d6a98f8ec46944071df484b8feb062 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 5 Nov 2010 19:50:11 +0000 Subject: - Patch #889366 by Kevin Hankens, jhodgdon: error in DrupalCacheInterface documentation . --- includes/cache.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'includes') 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 */ -- cgit v1.2.3