MDL-42493 revert nasty DB meta caching hack that was trying to work around shutdown issues

The original problem was resolved via new core shutdown handler support.
This commit is contained in:
Petr Škoda
2013-10-25 21:20:06 +02:00
parent 68291f2d57
commit 302506e03a
7 changed files with 24 additions and 34 deletions
+4 -3
View File
@@ -385,8 +385,9 @@ class pgsql_native_moodle_database extends moodle_database {
*/
public function get_columns($table, $usecache=true) {
if ($usecache) {
$this->init_caches();
if ($data = $this->metacache->get($table)) {
$properties = array('dbfamily' => $this->get_dbfamily(), 'settings' => $this->get_settings_hash());
$cache = cache::make('core', 'databasemeta', $properties);
if ($data = $cache->get($table)) {
return $data;
}
}
@@ -569,7 +570,7 @@ class pgsql_native_moodle_database extends moodle_database {
pg_free_result($result);
if ($usecache) {
$result = $this->metacache->set($table, $structure);
$cache->set($table, $structure);
}
return $structure;