Issue#209 Remove as much as db calls possible

This commit is contained in:
Qihui Chan
2022-05-13 13:48:28 +10:00
parent 0344500671
commit eb1372a8a7
5 changed files with 159 additions and 18 deletions

35
db/caches.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Define cache for plugin.
*
* @package auth_outage
* @author Qihui Chan <qihuichan@catalyst-au.net>
* @copyright 2022 Catalyst IT
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$definitions = [
'cache_active_outage_data' => [
'mode' => cache_store::MODE_APPLICATION,
],
'cache_ongoing_outage_data' => [
'mode' => cache_store::MODE_APPLICATION,
],
];