function ViewsData::cacheGet

Same name and namespace in other branches
  1. 11.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheGet()
  2. 10 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheGet()

Gets data from the cache backend.

Parameters

string $cid: The cache ID to return.

Return value

mixed The cached data, if any. This will immediately return FALSE if the $skipCache property is TRUE.

File

core/modules/views/src/ViewsData.php, line 186

Class

ViewsData
Class to manage and lazy load cached views data.

Namespace

Drupal\views

Code

protected function cacheGet($cid) {
  if ($this->skipCache) {
    return FALSE;
  }
  return $this->cacheBackend
    ->get($this->prepareCid($cid));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.