ApcObject   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 55
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
A flush() 0 3 1
A delete() 0 3 1
A info() 0 3 1
A store() 0 3 1
1
<?php
2
3
namespace Kemist\Cache\Storage;
4
5
/**
6
 * ApcObject
7
 *
8
 * @package Kemist\Cache
9
 * 
10
 * @version 1.0.2
11
 */
12
class ApcObject {
13
14
  /**
15
   * Gets a cached variable
16
   * 
17
   * @param string $name
18
   * 
19
   * @return mixed
20
   */
21
  public function get($name) {
22
    return apc_fetch($name);
23
  }
24
25
  /**
26
   * Flushes APC cache
27
   * 
28
   * @return bool
29
   */
30
  public function flush() {
31
    return apc_clear_cache('user');
32
  }
33
34
  /**
35
   * Deletes specified value from cache
36
   *    
37
   * @param string $name
38
   * 
39
   * @return bool
40
   */
41
  public function delete($name) {
42
    return apc_delete($name);
43
  }
44
45
  /**
46
   * Stores a value in cache
47
   * 
48
   * @param string $name   
49
   * @param mixed $val
50
   * 
51
   * @return bool
52
   */
53
  public function store($name, $val) {
54
    return apc_store($name, $val);
55
  }
56
57
  /**
58
   * Gets cache info
59
   * 
60
   * @return array
61
   */
62
  public function info() {
63
    return apc_cache_info('user');
64
  }
65
66
}
67