protected function DashboardBase::setCache in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Plugin/DashboardBase.php \Drupal\dashboards\Plugin\DashboardBase::setCache()
 
Set a new cache entry. Cache is prefixed by pluginid.
Parameters
string $cid: Cache id.
mixed $data: Data to cache.
int $expire: Expire data. Default to 3600.
array $tags: Tags for invalidation.
4 calls to DashboardBase::setCache()
- Comments::buildRenderArray in modules/
dashboards_comments/ src/ Plugin/ Dashboard/ Comments.php  - Build render array.
 - MatomoBase::query in modules/
dashboards_matomo/ src/ Plugin/ Dashboard/ MatomoBase.php  - Helper function for query matomo.
 - MostReaded::buildRenderArray in modules/
dashboards_statistic/ src/ Plugin/ Dashboard/ MostReaded.php  - Build render array.
 - Submissions::buildRenderArray in modules/
dashboards_webform/ src/ Plugin/ Dashboard/ Submissions.php  - Build render array.
 
File
- src/
Plugin/ DashboardBase.php, line 126  
Class
- DashboardBase
 - Base class for Dashboard plugins.
 
Namespace
Drupal\dashboards\PluginCode
protected function setCache(string $cid, $data, int $expire = 3600, array $tags = []) : void {
  $this->cache
    ->set($this
    ->getPluginId() . ':' . $cid, $data, $expire, $tags);
}