diff --git a/caches/FileCache.php b/caches/FileCache.php index ff939bea..24a9872f 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -54,10 +54,13 @@ class FileCache implements CacheInterface ]; $cacheFile = $this->createCacheFile($key); $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 + + // 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)); } }