-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCache.php
More file actions
51 lines (46 loc) · 1.13 KB
/
Copy pathCache.php
File metadata and controls
51 lines (46 loc) · 1.13 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
<?php
namespace FeatherBB\Core\Interfaces;
class Cache extends SlimSugar
{
/**
* Store data in the cache
*
* @param string $key
* @param mixed $data
* @param integer [optional] $expires
* @return self
*/
public static function store($key, $data, $expires = 0)
{
return static::$slim->getContainer()['cache']->store($key, $data, $expires);
}
/**
* Retrieve cached data by key
*
* @param string $key
* @param boolean [optional] $timestamp
* @return string
*/
public static function retrieve($key)
{
return static::$slim->getContainer()['cache']->retrieve($key);
}
/**
* Check whether data is associated with a key
*
* @param string $key
* @return boolean
*/
public static function isCached($key)
{
return static::$slim->getContainer()['cache']->isCached($key);
}
/**
* Flush all cached entries
* @return object
*/
public static function flush()
{
return static::$slim->getContainer()['cache']->flush();
}
}