1 cache.inc views_cache_get($cid, $use_language = FALSE)

Return data from the persistent views cache.

This is just a convenience wrapper around cache_get().

Parameters

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

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

Return value

stdClass|bool: The cache or FALSE on failure.

File

core/modules/views/includes/cache.inc, line 205
Load Views' data so that it knows what is available to build queries from.

Code

function views_cache_get($cid, $use_language = FALSE) {
  if ($use_language) {
    $cid .= ':' . $GLOBALS[LANGUAGE_TYPE_INTERFACE]->langcode;
  }

  return cache('views')->get($cid);
}