Elgg
Version 3.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Cacheable.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg
;
4
5
use
Elgg\Cache\CompositeCache
;
6
use
ElggCache
;
7
11
trait
Cacheable
{
12
16
protected
$cache;
17
25
public
function
setCache
(
ElggCache
$cache) {
26
$this->cache = $cache;
27
}
28
33
public
function
getCache
() {
34
if
(!isset($this->cache)) {
35
return
new
CompositeCache
(
'void'
,
_elgg_config
(),
ELGG_CACHE_BLACK_HOLE
);
36
}
37
38
return
$this->cache;
39
}
40
}
Cacheable
ELGG_CACHE_BLACK_HOLE
const ELGG_CACHE_BLACK_HOLE
Cache init values.
Definition:
constants.php:147
Elgg\Cache\CompositeCache
Composite cache pool.
Definition:
CompositeCache.php:22
Elgg\getCache
getCache()
Get cache.
Definition:
Cacheable.php:33
Elgg
Configuration exception.
CompositeCache
_elgg_config
_elgg_config()
Get the Elgg config service.
Definition:
configuration.php:164
Elgg\setCache
setCache(ElggCache $cache)
Set cache.
Definition:
Cacheable.php:25
ElggCache
Generated on Mon Jan 25 2021 00:00:19 for Elgg by
1.8.11