blob: 82c9c571af84b1a8f1ca1a710faba6ed8ca8fe9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
/**
* Shared memory cache description.
* Extends ElggCache with functions useful to shared memory style caches (static variables, memcache etc)
*/
abstract class ElggSharedMemoryCache extends ElggCache {
/**
* Namespace variable used to keep various bits of the cache
* separate.
*
* @var string
*/
private $namespace;
/**
* Set the namespace of this cache.
* This is useful for cache types (like memcache or static variables) where there is one large
* flat area of memory shared across all instances of the cache.
*
* @param string $namespace
*/
public function setNamespace($namespace = "default") {
$this->namespace = $namespace;
}
/**
* Get the namespace currently defined.
*
* @return string
*/
public function getNamespace() {
return $this->namespace;
}
}
|