@@ -75,7 +75,7 @@ |
||
| 75 | 75 | * |
| 76 | 76 | */ |
| 77 | 77 | public function testClear(){ |
| 78 | - $this->assertEquals($this->cacheStorage->clear(), true); |
|
| 78 | + $this->assertEquals($this->cacheStorage->clear(), true); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -95,23 +95,23 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | public function has($key){ |
| 97 | 97 | |
| 98 | - $cacheFile = implode('.',[$key,$this->ext]); |
|
| 99 | - $cacheLocation = $this->fs . DIRECTORY_SEPARATOR . $cacheFile; |
|
| 98 | + $cacheFile = implode('.',[$key,$this->ext]); |
|
| 99 | + $cacheLocation = $this->fs . DIRECTORY_SEPARATOR . $cacheFile; |
|
| 100 | 100 | |
| 101 | - if (!file_exists($cacheLocation)){ |
|
| 102 | - return false; |
|
| 103 | - } |
|
| 101 | + if (!file_exists($cacheLocation)){ |
|
| 102 | + return false; |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | - $data = \file_get_contents($cacheLocation); |
|
| 106 | - $cacheData = json_decode($data, TRUE); |
|
| 105 | + $data = \file_get_contents($cacheLocation); |
|
| 106 | + $cacheData = json_decode($data, TRUE); |
|
| 107 | 107 | |
| 108 | - //cache has expired |
|
| 109 | - if ($cacheData[0] < time() ){ |
|
| 110 | - \unlink($cacheLocation); |
|
| 111 | - return false; |
|
| 112 | - } |
|
| 108 | + //cache has expired |
|
| 109 | + if ($cacheData[0] < time() ){ |
|
| 110 | + \unlink($cacheLocation); |
|
| 111 | + return false; |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | - return true; |
|
| 114 | + return true; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -28,16 +28,16 @@ |
||
| 28 | 28 | * @param DateInterval $ttl |
| 29 | 29 | * @throws CacheException |
| 30 | 30 | */ |
| 31 | - public function __construct(DateInterval $ttl) |
|
| 32 | - { |
|
| 33 | - $foundApc = \extension_loaded('apc'); |
|
| 31 | + public function __construct(DateInterval $ttl) |
|
| 32 | + { |
|
| 33 | + $foundApc = \extension_loaded('apc'); |
|
| 34 | 34 | |
| 35 | - if (!$foundApc){ |
|
| 36 | - throw new CacheException('APC Extension not found.'); |
|
| 37 | - } |
|
| 35 | + if (!$foundApc){ |
|
| 36 | + throw new CacheException('APC Extension not found.'); |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - parent::__construct($ttl); |
|
| 40 | - } |
|
| 39 | + parent::__construct($ttl); |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Determines whether an item is present in the cache. |