Completed
Push — master ( 5f432b...5d5b15 )
by Jens
15:50 queued 05:48
created

ApcCacheAdapter::store()   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

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 4
crap 2
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 * @created 20.01.15, 13:42
5
 */
6
7
namespace Commercetools\Core\Cache;
8
9
/**
10
 * @deprecated use a PSR-6 cache adapter instead. Will be removed with v2.0
11
 * @package Commercetools\Core\Cache
12
 */
13
class ApcCacheAdapter extends AbstractCacheAdapter
0 ignored issues
show
Deprecated Code introduced by
The class Commercetools\Core\Cache\AbstractCacheAdapter has been deprecated with message: use a PSR-6 cache adapter instead. Will be removed with v2.0

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
14
{
15
    /**
16
     * @param $key
17
     * @param null $options
18
     * @return bool|\string[]
19
     */
20
    public function has($key, $options = null)
21
    {
22
        return apc_exists($key);
23
    }
24
25
    /**
26
     * @param $key
27
     * @param mixed $options
28
     * @return mixed|false
29
     */
30
    public function fetch($key, $options = null)
31
    {
32
        return apc_fetch($key);
33
    }
34
35
    /**
36
     * @param $key
37
     * @param $data
38
     * @param $lifeTime
39
     * @param $options
40
     * @return bool
41
     */
42
    public function store($key, $data, $lifeTime = null, $options = null)
43
    {
44
        return apc_store($key, $data, $lifeTime);
45
    }
46
47
    /**
48
     * @param $key
49
     * @param mixed $options
50
     * @return bool
51
     */
52
    public function remove($key, $options = null)
53
    {
54
        return apc_delete($key);
55
    }
56
}
57