public function __construct() { if (self::$instance !== null) { throw new JLD_System_Exception(__CLASS__ . ': only one instance of this class can be created.'); } if (JLD_Cache_Manager::isFake()) { throw new JLD_System_Exception(__CLASS__ . ':' . __METHOD__ . ' requires a real cache for performance consideration'); } $this->system_cache = JLD_Cache_Manager::getCache(); // we must make sure we are initialized! $this->init(); return parent::__construct(self::thisVersion); }
protected static function initFromCache() { $fake = JLD_Cache_Manager::isFake(); // if the cache is fake, then go the the lengthy process... if ($fake === true) { return self::initFromFileSystem(); } $cache = JLD_Cache_Manager::getCache(); $key = self::getCacheKey(self::thisCacheKeyVar); self::$cList = $cache->get($key); // this handles first time initialization OR // cache entry expiration if (self::$cList === false) { self::initFromFileSystem(); self::updateCache(); } }