Пример #1
0
 /**
  * Create and return the instance of phpFastCache\CacheManager 
  *
  * @return object	the instance of the Cache Manager if cache enabled
  *								in the configuration file (config/cache.php), null
  *								if disabled
  *
  * @static
  * @see Cache::clean()
  * @access public
  * @since Method available since Release 0.1.0
  */
 static function init()
 {
     if (self::$config === null) {
         self::$config = Config::get('cache');
     }
     if (self::$config['enabled'] === true) {
         CacheManager::setup(self::$config['settings']);
         if (self::$CacheManager === null) {
             self::$CacheManager = CacheManager::getInstance();
         }
         return self::$CacheManager;
     } else {
         return null;
     }
 }