2011-02-02 97 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