Elgg  Version master
Go to the documentation of this file.
1 <?php
3 namespace Elgg\Traits;
13 trait Cacheable {
18  protected $cache;
27  public function setCache(BaseCache $cache): void {
28  $this->cache = $cache;
29  }
36  public function getCache(): BaseCache {
37  if (!isset($this->cache)) {
38  return new CompositeCache('void', _elgg_services()->config, ELGG_CACHE_BLACK_HOLE);
39  }
41  return $this->cache;
42  }
43 }
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
Definition: LICENSE.txt:215
Cache init values.
Definition: constants.php:121
Composite cache pool.
The Elgg cache base class.
Definition: BaseCache.php:9
Get cache.
Definition: Cacheable.php:36
Get the global service provider.
Definition: elgglib.php:351
setCache(BaseCache $cache)
Set cache.
Definition: Cacheable.php:27