2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * Core cache definitions.
20 * This file is part of Moodle's cache API, affectionately called MUC.
21 * It contains the components that are requried in order to use caching.
25 * @copyright 2012 Sam Hemelryk
26 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31 // Used to store processed lang files.
32 // The keys used are the component of the string file.
34 'mode' => cache_store::MODE_APPLICATION,
38 'persistentmaxsize' => 3
41 // Used to store database meta information.
42 // The database meta information includes information about tables and there columns.
43 // Its keys are the table names.
44 // When creating an instance of this definition you must provide the database family that is being used.
45 'databasemeta' => array(
46 'mode' => cache_store::MODE_APPLICATION,
47 'requireidentifiers' => array(
51 'persistentmaxsize' => 2
54 // Event invalidation cache.
55 // This cache is used to manage event invalidation, its keys are the event names.
56 // Whenever something is invalidated it is both purged immediately and an event record created with the timestamp.
57 // When a new cache is initialised all timestamps are looked at and if past data is once more invalidated.
58 // Data guarantee is required in order to ensure invalidation always occurs.
59 // Persistence has been turned on as normally events are used for frequently used caches and this event invalidation
60 // cache will likely be used either lots or never.
61 'eventinvalidation' => array(
62 'mode' => cache_store::MODE_APPLICATION,
64 'requiredataguarantee' => true,
68 // Cache for question definitions. This is used by the question_bank class.
69 // Users probably do not need to know about this cache. They will just call
70 // question_bank::load_question.
71 'questiondata' => array(
72 'mode' => cache_store::MODE_APPLICATION,
73 'simplekeys' => true, // The id of the question is used.
74 'requiredataguarantee' => false,
75 'datasource' => 'question_finder',
76 'datasourcefile' => 'question/engine/bank.php',
79 // HTML Purifier cache
80 // This caches the html purifier cleaned text. This is done because the text is usually cleaned once for every user
81 // and context combo. Text caching handles caching for the combonation, this cache is responsible for caching the
82 // cleaned text which is shareable.
83 'htmlpurifier' => array(
84 'mode' => cache_store::MODE_APPLICATION,
87 // Used to store data from the config + config_plugins table in the database.
88 // The key used is the component:
89 // - core for all core config settings
90 // - plugin component for all plugin settings.
91 // Persistence is used because normally several settings within a script.
93 'mode' => cache_store::MODE_APPLICATION,