示例#1
0
 public static function GetCached()
 {
     if (is_object(self::$instance)) {
         return self::$instance;
     }
     $cached = Cache_MySQL::Get(self::CACHE_NAME);
     if (empty($cached)) {
         return self::Get(true);
     }
     $si = unserialize($cached);
     if (time() - $si->generated >= self::CACHE_LIFETIME) {
         return self::Get(true);
     }
     self::$instance = $si;
     return self::$instance;
 }
示例#2
0
 protected static function ShouldStop()
 {
     return Cache_MySQL::Get(self::$CACHE_STOP);
 }