Zend framework 如何使用zfdebug缓存插件?

Zend framework 如何使用zfdebug缓存插件?,zend-framework,Zend Framework,我正在使用zfdebug的最新svn版本(1.6)和zend 1.11.4,并试图让zfdebug的缓存插件正常工作 我发现了以下两个例子: 以及 在我的bootstrap.php中 # Setup the cache plugin if ($this->hasPluginResource('cache')) { $this->bootstrap('cache'); $cache = $this->getPluginResource('cache')->g

我正在使用zfdebug的最新svn版本(1.6)和zend 1.11.4,并试图让zfdebug的缓存插件正常工作

我发现了以下两个例子: 以及

在我的bootstrap.php中

# Setup the cache plugin
if ($this->hasPluginResource('cache')) {
    $this->bootstrap('cache');
    $cache = $this->getPluginResource('cache')->getDbAdapter();
    $options['plugins']['Cache']['backend'] = $cache->getBackend();
}
似乎不起作用,我调用了未定义的方法Gestionale\u Application\u Resource\u Cache::getDbAdapter()

我的application.ini有以下内容

;cache stuff
resources.cache.frontEnd = core 
resources.cache.backEnd = file 
resources.cache.frontEndOptions.lifetime = 1200 ; in secondi
resources.cache.frontEndOptions.automatic_serialization = true 
resources.cache.backEndOptions.lifetime = 3600 ; in secondi
resources.cache.backEndOptions.cache_dir = APPLICATION_PATH "/../cache"
pluginPaths.Gestionale_Application_Resource = APPLICATION_PATH "/../library/Gestionale/Application/Resource"  
;;fine cache stuff
谢谢:)

更换


# Setup the cache plugin
if ($this->hasPluginResource('cache')) {
    $this->bootstrap('cache');
    $cache = $this->getPluginResource('cache')->getDbAdapter();
    $options['plugins']['Cache']['backend'] = $cache->getBackend();
}


它永远不会进入if,我没有一个_initCache()函数,但我在我的项目中使用zend_cache,无论如何我都会给你正确的答案

# Setup the cache plugin
if ($this->hasResource('cache')) {
  $this->bootstrap('cache');
  $options['plugins']['Cache']['backend'] = $this->getResource('cache')->getBackend();
}