diff options
Diffstat (limited to 'framework/Data/SqlMap/TSqlMapConfig.php')
-rw-r--r-- | framework/Data/SqlMap/TSqlMapConfig.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/Data/SqlMap/TSqlMapConfig.php b/framework/Data/SqlMap/TSqlMapConfig.php index 98f2a844..c57ab40e 100644 --- a/framework/Data/SqlMap/TSqlMapConfig.php +++ b/framework/Data/SqlMap/TSqlMapConfig.php @@ -49,7 +49,7 @@ class TSqlMapConfig extends TDataSourceConfig $cache = $this->getApplication()->getCache();
if($cache !== null) {
$cache->delete($this->getCacheKey());
- }
+ }
}
/**
@@ -62,7 +62,10 @@ class TSqlMapConfig extends TDataSourceConfig {
$cache = $this->getApplication()->getCache();
if($cache !== null) {
- return $cache->set($this->getCacheKey(), $manager);
+ $dependencies = null;
+ if($this->getApplication()->getMode() !== TApplicationMode::Performance)
+ $dependencies = $manager->getCacheDependencies();
+ return $cache->set($this->getCacheKey(), $manager, 0, $dependencies);
}
}
return false;
@@ -147,6 +150,9 @@ class TSqlMapConfig extends TDataSourceConfig $this->cacheSqlMapManager($manager);
}
}
+ else {
+ $manager->setDbConnection($this->getDbConnection());
+ }
return $manager->getSqlmapGateway();
}
|