|
@@ -166,7 +166,7 @@ discard block |
|
|
block discarded – undo |
|
166
|
166
|
*/ |
|
167
|
167
|
public function sharedGet(string $path) : string |
|
168
|
168
|
{ |
|
169
|
|
- return $this->lock($path, LOCK_SH, function ($handle) use ($path) { |
|
|
169
|
+ return $this->lock($path, LOCK_SH, function($handle) use ($path) { |
|
170
|
170
|
$contents = fread($handle, filesize($path) ?: 1); |
|
171
|
171
|
|
|
172
|
172
|
if (false === $contents) { |
|
@@ -203,7 +203,7 @@ discard block |
|
|
block discarded – undo |
|
203
|
203
|
$this->createCacheFile(); |
|
204
|
204
|
} |
|
205
|
205
|
|
|
206
|
|
- return $this->lock($cacheFile, LOCK_EX, function ($handle) use ($cacheKey, $cacheFile, $value) { |
|
|
206
|
+ return $this->lock($cacheFile, LOCK_EX, function($handle) use ($cacheKey, $cacheFile, $value) { |
|
207
|
207
|
$contents = fread($handle, filesize($cacheFile) ?: 1) ?? ''; |
|
208
|
208
|
$contents = json_decode($contents, true) ?? []; |
|
209
|
209
|
|
Please login to merge, or discard this patch.