Implements a simple in-memory cache when other cacheing mechanisms are not available.
More...
Implements a simple in-memory cache when other cacheing mechanisms are not available.
- Author
- Andy Green
Definition at line 162 of file cache.inc.
◆ clear()
SimpleMemoryCache::clear |
( |
| ) |
|
Definition at line 206 of file cache.inc.
208 $this->cache = array();
◆ dump()
SimpleMemoryCache::dump |
( |
| ) |
|
Definition at line 211 of file cache.inc.
213 throw new FakoliException(
"Not implemented");
◆ filterKey()
SimpleMemoryCache::filterKey |
( |
|
$key | ) |
|
Internal callback function that supports the invalidateMatching function.
- Parameters
-
string | $key | the key to be filtered. |
Definition at line 201 of file cache.inc.
203 return !preg_match(
"/".$this->pattern.
"/", $key);
◆ get()
SimpleMemoryCache::get |
( |
|
$key | ) |
|
Definition at line 172 of file cache.inc.
174 return $this->cache[$key];
◆ invalidate()
SimpleMemoryCache::invalidate |
( |
|
$key | ) |
|
Definition at line 184 of file cache.inc.
186 unset($this->cache[$key]);
◆ invalidateMatching()
SimpleMemoryCache::invalidateMatching |
( |
|
$pattern | ) |
|
Definition at line 190 of file cache.inc.
192 $this->pattern = $pattern;
194 unset($this->pattern);
filterKey($key)
Internal callback function that supports the invalidateMatching function.
arrayFilterKey( $input, $callback)
Filter an array based on applying the specified callback to the keys.
◆ put()
SimpleMemoryCache::put |
( |
|
$key, |
|
|
|
$obj, |
|
|
|
$ttl = 0 |
|
) |
| |
Definition at line 177 of file cache.inc.
179 $this->cache[$key] = $obj;
◆ SimpleMemoryCache()
SimpleMemoryCache::SimpleMemoryCache |
( |
| ) |
|
Definition at line 166 of file cache.inc.
168 trace(
"Creating Simple In-memory Cache", 4);
169 $this->cache = array();
trace($msg, $lvl=3, $callStack=null)
Send output to the trace log.
◆ $cache
SimpleMemoryCache::$cache |
The documentation for this class was generated from the following file: