0
class CmsCache extends CmsObject
0
- static private $cache = null;
0
+ static private $instances = null;
0
+ private $cache = null;
0
function __construct($type = 'function')
0
$options['caching'] = false;
0
require_once(cms_join_path(ROOT_DIR, 'lib', 'pear', 'cache', 'lite', 'Function.php'));
0
-
self::$cache = new Cache_Lite_Function($options);
0
+
$this->cache = new Cache_Lite_Function($options);
0
require_once(cms_join_path(ROOT_DIR, 'lib', 'pear', 'cache', 'lite', 'Function.php'));
0
-
self::$cache = new Cache_Lite($options);
0
+
$this->cache = new Cache_Lite($options);
0
public static function get_instance($type = 'function')
0
- if (!isset($instances))
0
+ if (self::$instances == null)
0
+
self::$instances = array();
0
- if (empty(
$instances[$type]))
0
+ if (empty(
self::$instances[$type]))
0
-
$instances[$type] = new CmsCache($type);
0
+
self::$instances[$type] = new CmsCache($type);
0
- return
$instances[$type];
0
+ return
self::$instances[$type];
0
public function get($id, $group = 'default', $doNotTestCacheValidity = FALSE)
0
- return
self::$cache->get($id, $group, $doNotTestCacheValidity);
0
+ return
$this->cache->get($id, $group, $doNotTestCacheValidity);
0
public function save($data, $id = NULL, $group = 'default')
0
- return
self::$cache->save($data, $id, $group);
0
+ return
$this->cache->save($data, $id, $group);
0
$args = func_get_args();
0
- return call_user_func_array(array(
&self::$cache, 'call'), $args);
0
+ return call_user_func_array(array(
$this->cache, 'call'), $args);
0
$args = func_get_args();
0
- return call_user_func_array(array(
&self::$cache, 'drop'), $args);
0
+ return call_user_func_array(array(
$this->cache, 'drop'), $args);
0
public function clean($group = FALSE, $mode = 'ingroup')
0
CmsContentOperations::clear_cache();
0
- return
self::$cache->clean($group, $mode);
0
+ return
$this->clean($group, $mode);
0
static public function clear($group = FALSE, $mode = 'ingroup')
Comments
No one has commented yet.