function views_cache_get

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.

1 call to views_cache_get()
DisplayPluginBase::initDisplay in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php

File

drupal/core/modules/views/views.module, line 1722
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_cache_get($cid, $use_language = FALSE) {
  if (config('views.settings')
    ->get('skip_cache')) {
    return FALSE;
  }
  if ($use_language) {
    $cid .= ':' . language(Language::TYPE_INTERFACE)->langcode;
  }
  return cache('views_info')
    ->get($cid);
}