@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | // Check if file is Locked |
| 37 | 37 | $fileKey = $this->fixKey($key); |
| 38 | - $lockFile = $fileKey . ".lock"; |
|
| 38 | + $lockFile = $fileKey.".lock"; |
|
| 39 | 39 | if (file_exists($lockFile)) { |
| 40 | 40 | $this->logger->info("[Filesystem cache] Locked! $key. Waiting..."); |
| 41 | 41 | $lockTime = filemtime($lockFile); |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $validUntil = $this->addToNow($ttl); |
| 106 | 106 | if (!empty($validUntil)) { |
| 107 | - file_put_contents($fileKey . ".ttl", $validUntil); |
|
| 107 | + file_put_contents($fileKey.".ttl", $validUntil); |
|
| 108 | 108 | } |
| 109 | 109 | } catch (Exception $ex) { |
| 110 | - $this->logger->warning("[Filesystem cache] I could not write to cache on file '" . basename($key) . "'. Switching to nocache=true mode."); |
|
| 110 | + $this->logger->warning("[Filesystem cache] I could not write to cache on file '".basename($key)."'. Switching to nocache=true mode."); |
|
| 111 | 111 | return false; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | { |
| 134 | 134 | $this->logger->info("[Filesystem cache] Lock '$key'"); |
| 135 | 135 | |
| 136 | - $lockFile = $this->fixKey($key) . ".lock"; |
|
| 136 | + $lockFile = $this->fixKey($key).".lock"; |
|
| 137 | 137 | |
| 138 | 138 | try { |
| 139 | 139 | file_put_contents($lockFile, date('c')); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | $this->logger->info("[Filesystem cache] Unlock '$key'"); |
| 153 | 153 | |
| 154 | - $lockFile = $this->fixKey($key) . ".lock"; |
|
| 154 | + $lockFile = $this->fixKey($key).".lock"; |
|
| 155 | 155 | |
| 156 | 156 | if (file_exists($lockFile)) { |
| 157 | 157 | unlink($lockFile); |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | protected function fixKey($key) |
| 167 | 167 | { |
| 168 | - return $this->path . '/' |
|
| 168 | + return $this->path.'/' |
|
| 169 | 169 | . $this->prefix |
| 170 | - . '-' . preg_replace("/[\/\\\]/", "#", $key) |
|
| 170 | + . '-'.preg_replace("/[\/\\\]/", "#", $key) |
|
| 171 | 171 | . '.cache'; |
| 172 | 172 | } |
| 173 | 173 | |