weekly release 2.4dev
[moodle.git] / lib / db / caches.php
CommitLineData
d6a1f63b 1<?php
167ad91e
SH
2// This file is part of Moodle - http://moodle.org/
3//
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.
8//
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.
13//
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/>.
16
17/**
18 * Core cache definitions.
19 *
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.
22 *
23 * @package core
24 * @category cache
25 * @copyright 2012 Sam Hemelryk
26 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27 */
d6a1f63b
SH
28
29$definitions = array(
a560d636 30
170f821b 31 // Used to store processed lang files.
d6a1f63b
SH
32 'string' => array(
33 'mode' => cache_store::MODE_APPLICATION,
d6a1f63b
SH
34 'persistent' => true,
35 'persistentmaxsize' => 3
36 ),
a560d636 37
170f821b 38 // Used to store database meta information.
d6a1f63b
SH
39 'databasemeta' => array(
40 'mode' => cache_store::MODE_APPLICATION,
41 'requireidentifiers' => array(
42 'dbfamily'
43 ),
44 'persistent' => true,
45 'persistentmaxsize' => 2
46 ),
a560d636 47
170f821b 48 // Used to store data from the config + config_plugins table in the database.
d6a1f63b
SH
49 'config' => array(
50 'mode' => cache_store::MODE_APPLICATION,
51 'persistent' => true
52 ),
a560d636 53
170f821b 54 // Event invalidation cache.
d6a1f63b
SH
55 'eventinvalidation' => array(
56 'mode' => cache_store::MODE_APPLICATION,
57 'persistent' => true,
58 'requiredataguarantee' => true
a560d636
TH
59 ),
60
61 // Cache for question definitions. This is used by the question_bank class.
62 // Users probably do not need to know about this cache. They will just call
63 // question_bank::load_question.
64 'questiondata' => array(
65 'mode' => cache_store::MODE_APPLICATION,
66 'requiredataguarantee' => false,
67 'datasource' => 'question_finder',
68 'datasourcefile' => 'question/engine/bank.php',
69 ),
d6a1f63b 70);