private function initCache() { // Кеширование. Инициализация. $cache = new _Core_Cache(false, CACHE_ENABLED); // Файловый кеш if (CACHE_ENABLED) { $cache->addBackend(new _Core_Cache_Backend_Files(CACHE_FILES_DIR)); } // Memcached кеш if (CACHE_ENABLED && MEMCACHE_ENABLED) { $cache->addBackend(new _Core_Cache_Backend_Memcache(MEMCACHE_HOST, MEMCACHE_PORT)); } }
public function __construct($keyPrefix = false, $enabled = true) { self::$instance = $this; $this->enabled = (bool) $enabled; $this->keyPrefix = $keyPrefix; }