-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCacheInterface.php
More file actions
56 lines (50 loc) · 1.23 KB
/
CacheInterface.php
File metadata and controls
56 lines (50 loc) · 1.23 KB
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
50
51
52
53
54
55
56
<?php
/**
* This file is part of TbbcCacheBundle
*
* (c) TheBigBrainsCompany <contact@thebigbrainscompany.com>
*
*/
namespace Tbbc\CacheBundle\Cache;
/**
* Interface Cache
*
* @author Benjamin Dulau <benjamin.dulau@gmail.com>
*/
interface CacheInterface
{
/**
* Returns the cache name
*
* @return string
*/
public function getName();
/**
* Return the value to which this cache maps the specified key.
*
* @param string $key The unique key of the cache entry to fetch.
* @return mixed The cached data or null, if no cache entry exists for the given id.
*/
public function get($key);
/**
* Puts data into the cache.
*
* @param string $key
* @param mixed $value
* @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
*/
public function set($key, $value);
/**
* Deletes the mapping for this key from this cache
*
* @param string $key
* @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
*/
public function delete($key);
/**
* Invalidates all mappings from the cache
*
* @return mixed
*/
public function flush();
}