1<?php
2namespace DALMP\Cache;
3
4/**
5 * CacheInterface
6 *
7 * @author Nicolas Embriz <nbari@dalmp.com>
8 * @package DALMP
9 * @license BSD License
10 * @version 3.0.3
11 */
12interface CacheInterface
13{
14    /**
15     * Store data at the server
16     *
17     * @param  string $key
18     * @param  string $value
19     * @param  int    $ttl   time in seconds(default is 0 meaning unlimited)
20     * @return this
21     */
22    public function Set($key, $value, $ttl = 0);
23
24    /**
25     * Retrieve item from the server
26     *
27     * @param  string $key
28     * @return mixed
29     */
30    public function Get($key);
31
32    /*
33     * Delete item from the server
34     *
35     * @param  string $key
36     * @return bool
37     */
38    public function Delete($key);
39
40    /**
41     * Flush cache
42     *
43     * @return bool
44     */
45    public function Flush();
46
47    /**
48     * Get cache stats
49     *
50     * @return bool
51     */
52    public function Stats();
53
54    /**
55     * X execute/call custom methods
56     *
57     * @return cache object
58     */
59    public function X();
60
61}
62