2011-02-02 52 views

回答

0

我延长sfApplicationConfiguration:

的myproject /应用/前端/ LIB/sfApplicationConfigurationExtended .class.php

class sfApplicationConfigurationExtended extends sfApplicationConfiguration 
{ 
    public function getConfigCache() 
    { 
    if (null === $this->configCache) 
    { 
     $this->configCache = new sfConfigBlobCache($this); 
    } 

    return $this->configCache; 
    } 
} 

的myproject /应用/前端/配置/ frontendConfiguration.class.php

class frontendConfiguration extends sfApplicationConfiguration #sfApplicationConfigurationExtended // For config blob caching 
{ 
    public function configure() 
    { 
    } 
} 
1

您可能会感兴趣this对您有所帮助。

说明如何自定义configCache。

+0

Thx,但这只是使用配置缓存为自己yml文件,而不是关于如何处理配置缓存实现另一种存储类型。 – ownking 2011-02-02 16:53:41