Issue #863428 by Albert Volkman: Fixup for cache constant docs

8.0.x
Jennifer Hodgdon 2012-09-17 12:06:37 -07:00
parent 3da6b98435
commit 8e5ac8d316
1 changed files with 13 additions and 11 deletions

View File

@ -108,17 +108,20 @@ const HTTP_REQUEST_TIMEOUT = -1;
* @{ * @{
* Constants that define each block's caching state. * Constants that define each block's caching state.
* *
* Modules specify the caching patterns for their blocks using binary * Modules specify how their blocks can be cached in their hook_block_info()
* combinations of these constants in their hook_block_info(). * implementations. Caching can be turned off (DRUPAL_NO_CACHE), managed by the
* DRUPAL_CACHE_PER_ROLE is used as a default when no caching pattern is * module declaring the block (DRUPAL_CACHE_CUSTOM), or managed by the core
* specified. Use DRUPAL_CACHE_CUSTOM to disable standard block cache and * Block module. If the Block module is managing the cache, you can specify that
* implement * the block is the same for every page and user (DRUPAL_CACHE_GLOBAL), or that
* it can change depending on the page (DRUPAL_CACHE_PER_PAGE) or by user
* (DRUPAL_CACHE_PER_ROLE or DRUPAL_CACHE_PER_USER). Page and user settings can
* be combined with a bitwise-binary or operator; for example,
* DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE means that the block can change
* depending on the user role or page it is on.
* *
* The block cache is cleared when the 'content' cache tag is invalidated, * The block cache is cleared when the 'content' cache tag is invalidated,
* following the same pattern as the page cache (node, comment, user, taxonomy * following the same pattern as the page cache (node, comment, user, taxonomy
* added or updated...). Blocks requiring more fine-grained clearing might * added or updated...).
* consider disabling the built-in block cache (DRUPAL_NO_CACHE)
* and roll their own.
* *
* Note that user 1 is excluded from block caching. * Note that user 1 is excluded from block caching.
*/ */
@ -137,9 +140,8 @@ const DRUPAL_NO_CACHE = -1;
/** /**
* The block is handling its own caching in its hook_block_view(). * The block is handling its own caching in its hook_block_view().
* *
* From the perspective of the block cache system, this is equivalent to * This setting is useful when time based expiration is needed or a site uses a
* DRUPAL_NO_CACHE. Useful when time based expiration is needed or a site uses * node access which invalidates standard block cache.
* a node access which invalidates standard block cache.
*/ */
const DRUPAL_CACHE_CUSTOM = -2; const DRUPAL_CACHE_CUSTOM = -2;