mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-51374 dml: Delete selectively instead of purge for tmptables
This commit is contained in:
parent
ef474575e1
commit
ad90c7a5d5
@ -1055,12 +1055,10 @@ abstract class moodle_database {
|
||||
*/
|
||||
public function reset_caches($tablenames = null) {
|
||||
if (!empty($tablenames)) {
|
||||
$temptablepurged = false;
|
||||
$dbmetapurged = false;
|
||||
foreach ($tablenames as $tablename) {
|
||||
if ($temptablepurged === false && $this->temptables->is_temptable($tablename)) {
|
||||
$this->get_temp_tables_cache()->purge();
|
||||
$temptablepurged = true;
|
||||
if ($this->temptables->is_temptable($tablename)) {
|
||||
$this->get_temp_tables_cache()->delete($tablename);
|
||||
} else if ($dbmetapurged === false) {
|
||||
$this->tables = null;
|
||||
$this->get_metacache()->purge();
|
||||
|
Loading…
x
Reference in New Issue
Block a user