Class arObjectCache.
More...
◆ flush()
static arObjectCache::flush |
( |
|
$class_name | ) |
|
|
static |
◆ get()
static arObjectCache::get |
( |
|
$class, |
|
|
|
$id |
|
) |
| |
|
static |
◆ isCached()
static arObjectCache::isCached |
( |
|
$class, |
|
|
|
$id |
|
) |
| |
|
static |
- Parameters
-
- Returns
- bool
Definition at line 26 of file class.arObjectCache.php.
27 {
28 $instance = new $class();
30 if ($instance->getCache()->exists($instance->getCacheIdentifier())) {
31 return true;
32 }
33 }
34
35 if (!isset(self::$cache[$class])) {
36 return false;
37 }
38 if (!isset(self::$cache[$class][$id]) || !self::$cache[$class][$id] instanceof
ActiveRecord) {
39 return false;
40 }
41
42 return in_array($id, array_keys(self::$cache[$class]));
43 }
References CachedActiveRecord\getCacheIdentifier().
Referenced by ActiveRecord\buildFromArray().
◆ printStats()
static arObjectCache::printStats |
( |
| ) |
|
|
static |
Definition at line 62 of file class.arObjectCache.php.
63 {
64 foreach (self::$cache as $class => $objects) {
65 echo $class;
66 echo ": ";
67 echo count($objects);
68 echo " Objects<br>";
69 }
70 }
◆ purge()
◆ store()
◆ $cache
arObjectCache::$cache = array() |
|
staticprotected |
The documentation for this class was generated from the following file: