Completed
Push — develop ( 8b2ab3...f876c4 )
by
unknown
25:57 queued 17:57
created

ApcCacheAdapter::remove()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * @author @ct-jensschulze <[email protected]>
4
 * @created 20.01.15, 13:42
5
 */
6
7
namespace Commercetools\Core\Cache;
8
9
/**
10
 * @package Commercetools\Core\Cache
11
 */
12
class ApcCacheAdapter extends AbstractCacheAdapter
13
{
14
    /**
15
     * @param $key
16
     * @param null $options
17
     * @return bool|\string[]
18
     */
19
    public function has($key, $options = null)
20
    {
21
        return apc_exists($key);
22
    }
23
24
    /**
25
     * @param $key
26
     * @param mixed $options
27
     * @return mixed|false
28
     */
29
    public function fetch($key, $options = null)
30
    {
31
        return apc_fetch($key);
32
    }
33
34
    /**
35
     * @param $key
36
     * @param $data
37
     * @param $lifeTime
38
     * @param $options
39
     * @return bool
40
     */
41
    public function store($key, $data, $lifeTime = null, $options = null)
42
    {
43
        return apc_store($key, $data, $lifeTime);
44
    }
45
46
    /**
47
     * @param $key
48
     * @param mixed $options
49
     * @return bool
50
     */
51
    public function remove($key, $options = null)
52
    {
53
        return apc_delete($key);
54
    }
55
}
56