Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
PluginSettingsCache.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\Cache;
3 
4 use Elgg\Database;
5 
13 
19  private $values = array();
20 
27  public function setCachedValues(array $cache) {
28  $this->values = $cache;
29  }
30 
38  public function getAll($entity_guid) {
39  return isset($this->values[$entity_guid]) ? $this->values[$entity_guid] : null;
40  }
41 
48  public function clear($entity_guid) {
49  unset($this->values[$entity_guid]);
50  }
51 
57  public function clearAll() {
58  $this->values = [];
59  }
60 }
setCachedValues(array $cache)
Set the settings cache for known plugins.
$entity_guid
Definition: save.php:9
In memory cache of (non-user-specific, non-internal) plugin settings.
getAll($entity_guid)
Get all the non-user, non-internal settings for a plugin.
clear($entity_guid)
Clear cache for an entity.