public function getCache() { $cache = new PwCache(); $cache->mergeKeys(Wekit::V('cacheKeys')); if (Wekit::V('dbcache') && $cache->isDbCache()) { PwLoader::importCache(Wekit::S('cacheService')); } return $cache; }
/** * 创建当前应用实例 */ public static function createapp($appName) { if (!is_object(self::$_app)) { self::$_var = (include CONF_PATH . 'baseconfig.php'); self::$_cache = new PwCache(); if (self::$_var['dbcache'] && self::$_cache->isDbCache()) { PwLoader::importCache(include CONF_PATH . 'cacheService.php'); } $class = Wind::import('SRC:bootstrap.' . $appName . 'Boot'); self::$_app = new $class(); self::$_config = self::$_app->getConfig(); define('WEKIT_TIMESTAMP', self::$_app->getTime()); } }