aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/StudipSystemCache.class.php
blob: 895d1216653b2374187b56669888e98ed1d3ea1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
 * An interface which has to be implemented by caches available for administration
 * via Stud.IP GUI
 *
 * @package    studip
 * @subpackage lib
 *
 * @author     Thomas Hackl <studip@thomas-hackl.name>
 * @copyright  2021 Stud.IP Core-Group
 * @since      Stud.IP 5.0
 * @license    GPL2 or any later version
 */

interface StudipSystemCache extends StudipCache
{

    /**
     * @return string A translateable display name for this cache class.
     */
    public static function getDisplayName(): string;

    /**
     * Get some statistics from cache, like number of entries, hit rate or
     * whatever the underlying cache provides.
     * Results are returned in form of an array like
     *      "[
     *          [
     *              'name' => <displayable name>
     *              'value' => <value of the current stat>
     *          ]
     *      ]"
     *
     * @return array
     */
    public function getStats(): array;

    /**
     * Return the Vue component name and props that handle configuration.
     * The associative array is of the form
     *  [
     *      'component' => <Vue component name>,
     *      'props' => <Properties for component>
     *  ]
     *
     * @return array
     */
    public static function getConfig(): array;
}