aboutsummaryrefslogtreecommitdiff
path: root/caches/FileCache.php
diff options
context:
space:
mode:
authorGravatar Anshul Gupta <ansg191@anshulg.com> 2025-03-02 19:32:33 -0800
committerGravatar GitHub <noreply@github.com> 2025-03-02 19:32:33 -0800
commit8b16dd20f6544af3eedf286e23c0d34ab525736c (patch)
treeec284e22a046c4c8e9626e3fa64a000a2747bf84 /caches/FileCache.php
parentb183aa798af48af556496c42780d6e844172cf44 (diff)
parent00a24e2f694a319a5e6cb070dddfff2dae892378 (diff)
downloadrss-bridge-master.tar.gz
rss-bridge-master.tar.zst
rss-bridge-master.zip
Merge branch 'RSS-Bridge:master' into masterHEADmaster
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));
}
}