aboutsummaryrefslogtreecommitdiff
path: root/caches/FileCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'caches/FileCache.php')
-rw-r--r--caches/FileCache.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/caches/FileCache.php b/caches/FileCache.php
index dfd295e8..24a9872f 100644
--- a/caches/FileCache.php
+++ b/caches/FileCache.php
@@ -53,11 +53,14 @@ class FileCache implements CacheInterface
'value' => $value,
];
$cacheFile = $this->createCacheFile($key);
- $bytes = file_put_contents($cacheFile, serialize($item), LOCK_EX);
- // todo: Consider tightening the permissions of the created file. It usually allow others to read, depending on umask
+ $bytes = file_put_contents($cacheFile, serialize($item));
+
+ // TODO: Consider tightening the permissions of the created file.
+ // It usually allow others to read, depending on umask
+
if ($bytes === false) {
- // Consider just logging the error here
- throw new \Exception(sprintf('Failed to write to: %s', $cacheFile));
+ // Typically means no disk space remaining
+ $this->logger->warning(sprintf('Failed to write to: %s', $cacheFile));
}
}