diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Util/TParameterModule.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/framework/Util/TParameterModule.php b/framework/Util/TParameterModule.php index fb962db4..e63fad1d 100644 --- a/framework/Util/TParameterModule.php +++ b/framework/Util/TParameterModule.php @@ -59,8 +59,21 @@ class TParameterModule extends TModule $this->loadParameters($config);
if($this->_paramFile!==null)
{
- $dom=new TXmlDocument;
- $dom->loadFromFile($this->_paramFile);
+ if(($cache=$this->getApplication()->getCache())!==null)
+ {
+ $cacheKey='TParameterModule:'.$this->_paramFile;
+ if(($dom=$cache->get($cacheKey))===false)
+ {
+ $dom=new TXmlDocument;
+ $dom->loadFromFile($this->_paramFile);
+ $cache->set($cacheKey,$dom,0,new TFileCacheDependency($this->_paramFile));
+ }
+ }
+ else
+ {
+ $dom=new TXmlDocument;
+ $dom->loadFromFile($this->_paramFile);
+ }
$this->loadParameters($dom);
}
$this->_initialized=true;
|