1 | <?php |
||
19 | class Runtime extends Cache |
||
20 | { |
||
21 | /** |
||
22 | * The runtime cache storage array. |
||
23 | * |
||
24 | * @var array |
||
25 | * @since 1.0 |
||
26 | */ |
||
27 | private static $store = array(); |
||
28 | |||
29 | /** |
||
30 | * This will wipe out the entire cache's keys |
||
31 | * |
||
32 | * @return boolean The result of the clear operation. |
||
33 | * |
||
34 | * @since 1.0 |
||
35 | */ |
||
36 | 1 | public function clear() |
|
42 | |||
43 | /** |
||
44 | * Method to get a storage entry value from a key. |
||
45 | * |
||
46 | * @param string $key The storage entry identifier. |
||
47 | * |
||
48 | * @return CacheItemInterface |
||
49 | * |
||
50 | * @since 1.0 |
||
51 | */ |
||
52 | 1 | public function getItem($key) |
|
63 | |||
64 | /** |
||
65 | * Method to remove a storage entry for a key. |
||
66 | * |
||
67 | * @param string $key The storage entry identifier. |
||
68 | * |
||
69 | * @return boolean |
||
70 | * |
||
71 | * @since 1.0 |
||
72 | */ |
||
73 | 1 | public function deleteItem($key) |
|
79 | |||
80 | /** |
||
81 | * Persists a cache item immediately. |
||
82 | * |
||
83 | * @param CacheItemInterface $item The cache item to save. |
||
84 | * |
||
85 | * @return static The invoked object. |
||
86 | */ |
||
87 | 1 | public function save(CacheItemInterface $item) |
|
93 | |||
94 | /** |
||
95 | * Method to determine whether a storage entry has been set for a key. |
||
96 | * |
||
97 | * @param string $key The storage entry identifier. |
||
98 | * |
||
99 | * @return boolean |
||
100 | * |
||
101 | * @since 1.0 |
||
102 | */ |
||
103 | 1 | public function hasItem($key) |
|
107 | |||
108 | /** |
||
109 | * Test to see if the CacheItemPoolInterface is available |
||
110 | * |
||
111 | * @return boolean True on success, false otherwise |
||
112 | * |
||
113 | * @since __DEPLOY_VERSION__ |
||
114 | */ |
||
115 | public static function isSupported() |
||
119 | } |
||
120 |