-
Notifications
You must be signed in to change notification settings - Fork 7
/
iCache.php
63 lines (59 loc) · 1.27 KB
/
iCache.php
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
57
58
59
60
61
62
<?php
namespace Luracast\Restler;
/**
* Interface for the cache system that manages caching of given data
*
* @category Framework
* @package Restler
* @author R.Arul Kumaran <[email protected]>
* @copyright 2010 Luracast
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link http://luracast.com/products/restler/
*
*/
interface iCache
{
/**
* store data in the cache
*
* @abstract
*
* @param string $name
* @param mixed $data
*
* @return boolean true if successful
*/
public function set($name, $data);
/**
* retrieve data from the cache
*
* @abstract
*
* @param string $name
* @param bool $ignoreErrors
*
* @return mixed
*/
public function get($name, $ignoreErrors = false);
/**
* delete data from the cache
*
* @abstract
*
* @param string $name
* @param bool $ignoreErrors
*
* @return boolean true if successful
*/
public function clear($name, $ignoreErrors = false);
/**
* check if the given name is cached
*
* @abstract
*
* @param string $name
*
* @return boolean true if cached
*/
public function isCached($name);
}