diff options
author | 2025-03-02 19:32:33 -0800 | |
---|---|---|
committer | 2025-03-02 19:32:33 -0800 | |
commit | 8b16dd20f6544af3eedf286e23c0d34ab525736c (patch) | |
tree | ec284e22a046c4c8e9626e3fa64a000a2747bf84 /caches/FileCache.php | |
parent | b183aa798af48af556496c42780d6e844172cf44 (diff) | |
parent | 00a24e2f694a319a5e6cb070dddfff2dae892378 (diff) | |
download | rss-bridge-master.tar.gz rss-bridge-master.tar.zst rss-bridge-master.zip |
Diffstat (limited to 'caches/FileCache.php')
-rw-r--r-- | caches/FileCache.php | 11 |
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)); } } |