Example #1
0
File: Cache.php Project: noikiy/PD
 public static function initCache()
 {
     if (self::$cache_instance == null) {
         self::$cache_instance = JO_Cache::getInstance('sqlfile', array('livetime' => self::$cache_time));
     }
     return self::$cache_instance;
 }
Example #2
0
 /**
  * @param array|string $options
  * @return JO_Cache
  */
 public static function getInstance($driver, $options = array())
 {
     if (self::$instance == null) {
         self::$instance = new self();
         $driver_name = 'JO_Cache_' . ucfirst(strtolower($driver));
         self::$driver = new $driver_name($options);
     }
     return self::$instance;
 }