Completed
Push — feature/0.7.0 ( 6e3da4...74a933 )
by Ryuichi
03:26
created
WebStream/Cache/Driver/Apcu.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,11 +36,10 @@  discard block
 block discarded – undo
36 36
         if (!$this->isAvailableCacheLibrary()) {
37 37
             return false;
38 38
         }
39
-        $key = $this->cacheContainer->cachePrefix . $key;
39
+        $key = $this->cacheContainer->cachePrefix.$key;
40 40
 
41
-        $result = $overrite ? $this->cacheContainer->driver->delegate("apcu_store", [$key, $value, $ttl]) :
42
-            $this->cacheContainer->driver->delegate("apcu_add", [$key, $value, $ttl]);
43
-        $this->logger->info("Execute cache save: " . $key);
41
+        $result = $overrite ? $this->cacheContainer->driver->delegate("apcu_store", [$key, $value, $ttl]) : $this->cacheContainer->driver->delegate("apcu_add", [$key, $value, $ttl]);
42
+        $this->logger->info("Execute cache save: ".$key);
44 43
 
45 44
         return $result;
46 45
     }
@@ -53,13 +52,13 @@  discard block
 block discarded – undo
53 52
         if (!$this->isAvailableCacheLibrary()) {
54 53
             return null;
55 54
         }
56
-        $key = $this->cacheContainer->cachePrefix . $key;
55
+        $key = $this->cacheContainer->cachePrefix.$key;
57 56
         $value = $this->cacheContainer->driver->delegate("apcu_fetch", [$key]);
58 57
 
59 58
         if ($value !== false) {
60
-            $this->logger->info("Execute cache read: " . $key);
59
+            $this->logger->info("Execute cache read: ".$key);
61 60
         } else {
62
-            $this->logger->warn("Failed to read cache: " . $key);
61
+            $this->logger->warn("Failed to read cache: ".$key);
63 62
             $value = null;
64 63
         }
65 64
 
@@ -74,13 +73,13 @@  discard block
 block discarded – undo
74 73
         if (!$this->isAvailableCacheLibrary()) {
75 74
             return false;
76 75
         }
77
-        $key = $this->cacheContainer->cachePrefix . $key;
76
+        $key = $this->cacheContainer->cachePrefix.$key;
78 77
 
79 78
         if ($this->cacheContainer->driver->delegate("apcu_delete", [$key])) {
80
-            $this->logger->info("Execute cache cleared: " . $key);
79
+            $this->logger->info("Execute cache cleared: ".$key);
81 80
             return true;
82 81
         } else {
83
-            $this->logger->warn("Failed to clear cache: " . $key);
82
+            $this->logger->warn("Failed to clear cache: ".$key);
84 83
             return false;
85 84
         }
86 85
     }
@@ -95,17 +94,17 @@  discard block
 block discarded – undo
95 94
         }
96 95
 
97 96
         if (class_exists('\APCUIterator')) {
98
-            $obj = new \APCUIterator('/^' . $this->cacheContainer->cachePrefix . '/', APC_ITER_KEY);
97
+            $obj = new \APCUIterator('/^'.$this->cacheContainer->cachePrefix.'/', APC_ITER_KEY);
99 98
             if ($this->cacheContainer->driver->delegate("apcu_delete", [$obj])) {
100
-                $this->logger->info("Execute all cache cleared: " . $this->cacheContainer->cachePrefix . "*");
99
+                $this->logger->info("Execute all cache cleared: ".$this->cacheContainer->cachePrefix."*");
101 100
                 return true;
102 101
             }
103 102
         } elseif ($this->cacheContainer->driver->delegate("apcu_clear_cache")) {
104
-            $this->logger->info("Execute all cache cleared: " . $this->cacheContainer->cachePrefix . "*");
103
+            $this->logger->info("Execute all cache cleared: ".$this->cacheContainer->cachePrefix."*");
105 104
             return true;
106 105
         }
107 106
 
108
-        $this->logger->warn("Failed to clear all cache: " . $this->cacheContainer->cachePrefix . "*");
107
+        $this->logger->warn("Failed to clear all cache: ".$this->cacheContainer->cachePrefix."*");
109 108
         return false;
110 109
     }
111 110
 
Please login to merge, or discard this patch.