function ViewsData::cacheSet
Same name and namespace in other branches
- 11.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheSet()
- 10 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheSet()
- 9 core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheSet()
- 8.9.x core/modules/views/src/ViewsData.php \Drupal\views\ViewsData::cacheSet()
Sets data to the cache backend.
Parameters
string $cid: The cache ID to set.
mixed $data: The data that will be cached.
Deprecated
in drupal:11.5.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/project/drupal/issues/3587797
File
-
core/
modules/ views/ src/ ViewsData.php, line 198
Class
- ViewsData
- Class to manage and lazy load cached views data.
Namespace
Drupal\viewsCode
protected function cacheSet($cid, $data) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:11.5.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/project/drupal/issues/3587797', E_USER_DEPRECATED);
return $this->cacheBackend
->set($this->prepareCid($cid), $data, Cache::PERMANENT, [
'views_data',
'config:core.extension',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.