1<?php
2namespace TYPO3Fluid\Fluid\Core\Cache;
3
4/*
5 * This file belongs to the package "TYPO3 Fluid".
6 * See LICENSE.txt that was shipped with this package.
7 */
8
9/**
10 * Interface FluidCacheInterface
11 *
12 * Implemented by classes providing caching
13 * features for the Fluid templates being rendered.
14 */
15interface FluidCacheInterface
16{
17
18    /**
19     * Gets an entry from the cache or NULL if the
20     * entry does not exist.
21     *
22     * @param string $name
23     * @return mixed
24     */
25    public function get($name);
26
27    /**
28     * Set or updates an entry identified by $name
29     * into the cache.
30     *
31     * @param string $name
32     * @param mixed $value
33     * @return void
34     */
35    public function set($name, $value);
36
37    /**
38     * Flushes the cache either by entry or flushes
39     * the entire cache if no entry is provided.
40     *
41     * @param string|NULL $name
42     * @return void
43     */
44    public function flush($name = null);
45
46    /**
47     * @return FluidCacheWarmerInterface
48     */
49    public function getCacheWarmer();
50}
51