You are here

function views_cache_get in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 includes/cache.inc \views_cache_get()
  2. 6.3 includes/cache.inc \views_cache_get()
  3. 7.3 includes/cache.inc \views_cache_get()

Return data from the persistent views cache.

This is just a convenience wrapper around cache_get().

Parameters

$cid: The cache ID of the data to retrieve.

$use_language: If TRUE, the data will be requested specific to the currently active language.

4 calls to views_cache_get()
views_block in ./views.module
Implementation of hook_block
views_get_default_view in ./views.module
Get a view from the default views defined by modules.
_views_discover_default_views in includes/cache.inc
Scan all modules for default views and rebuild the default views cache.
_views_fetch_data in includes/cache.inc
Fetch Views' data from the cache

File

includes/cache.inc, line 191
cache.inc

Code

function views_cache_get($cid, $use_language = FALSE) {
  global $language;
  if (variable_get('views_skip_cache', FALSE)) {
    return 0;
  }
  if ($use_language) {
    $cid .= ':' . $language->language;
  }
  return cache_get($cid, 'cache_views');
}