Zend(ZF1) - 如何清除缓存

时间:2017-04-10 15:15:35

标签: caching zend-framework

我已经更新了app.ini文件,但有人写了这段代码以使用缓存。如何清除缓存?

    static $configuration;

    if (!$configuration) {
        if (Zend_Registry::isRegistered("configuration")) {
            $configuration = Zend_Registry::get("configuration");
        }
        else {
            $cache = self::getCache();

            if (!$configuration = $cache->load("configuration")) {
                $configuration = new Zend_Config_Ini(APPLICATION_PATH . "/config/app.ini", APPLICATION_ENVIRONMENT);
                $cache->save($configuration, "configuration");
            }

            Zend_Registry::set("configuration", $configuration);
        }
    }

0 个答案:

没有答案