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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user