4
* This file is part of the Assetic package, an OpenSky project.
6
* (c) 2010-2013 OpenSky Project Inc
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
12
namespace Assetic\Cache;
15
* Interface for a cache backend.
17
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
19
interface CacheInterface
22
* Checks if the cache has a value for a key.
24
* @param string $key A unique key
26
* @return Boolean Whether the cache has a value for this key
28
public function has($key);
31
* Returns the value for a key.
33
* @param string $key A unique key
35
* @return string|null The value in the cache
37
public function get($key);
40
* Sets a value in the cache.
42
* @param string $key A unique key
43
* @param string $value The value to cache
45
public function set($key, $value);
48
* Removes a value from the cache.
50
* @param string $key A unique key
52
public function remove($key);