autoload; cache; tests;
[m6w6/pq-gateway] / lib / pq / Gateway / Table / CacheInterface.php
1 <?php
2
3 namespace pq\Gateway\Table;
4
5 interface CacheInterface
6 {
7 /**
8 * Set an item
9 * @param string $key
10 * @param mixed $val
11 * @param int $ttl
12 * @return \pq\Gateway\Table\CacheInterface
13 */
14 function set($key, $val, $ttl = 0);
15
16 /**
17 * Get an item
18 * @param string $key
19 * @param bool $exists
20 * @return mixed
21 */
22 function get($key, &$exists = null);
23
24 /**
25 * Delete an item
26 * @param string $key
27 * @return \pq\Gateway\Table\CacheInterface
28 */
29 function del($key);
30 }