MDL-36120 cachestore_file: improved file storage method + new setting
[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,
2e1e266c 34 'simpledata' => true,
d6a1f63b
SH
35 'persistent' => true,
36 'persistentmaxsize' => 3
37 ),
a560d636 38
170f821b 39 // Used to store database meta information.
d6a1f63b
SH
40 'databasemeta' => array(
41 'mode' => cache_store::MODE_APPLICATION,
42 'requireidentifiers' => array(
43 'dbfamily'
44 ),
45 'persistent' => true,
46 'persistentmaxsize' => 2
47 ),
a560d636 48
170f821b 49 // Used to store data from the config + config_plugins table in the database.
d6a1f63b
SH
50 'config' => array(
51 'mode' => cache_store::MODE_APPLICATION,
2e1e266c
SH
52 'persistent' => true,
53 'simpledata' => true
d6a1f63b 54 ),
a560d636 55
170f821b 56 // Event invalidation cache.
d6a1f63b
SH
57 'eventinvalidation' => array(
58 'mode' => cache_store::MODE_APPLICATION,
59 'persistent' => true,
2e1e266c
SH
60 'requiredataguarantee' => true,
61 'simpledata' => true,
a560d636
TH
62 ),
63
64 // Cache for question definitions. This is used by the question_bank class.
65 // Users probably do not need to know about this cache. They will just call
66 // question_bank::load_question.
67 'questiondata' => array(
68 'mode' => cache_store::MODE_APPLICATION,
69 'requiredataguarantee' => false,
70 'datasource' => 'question_finder',
71 'datasourcefile' => 'question/engine/bank.php',
72 ),
d6a1f63b 73);