summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <[email protected]>2022-12-20 08:22:21 +0300
committerfox <[email protected]>2022-12-20 08:22:21 +0300
commit423b26afc503c07166bd66d897bfe839c2cba10b (patch)
tree5fbcb15542e14f33e7d0404b8b154c7a0330abe2
parentc6d21b31965b28e2b3b86f42a97289c3ee95fa28 (diff)
parent8b129626cd2c10a26c505b104a0f403656782ce0 (diff)
Merge pull request 'Only touch on send for expirable cache files.' (#95) from wn/tt-rss:bugfix/local-cache-feed-icons-ts into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/95
-rw-r--r--classes/cache/local.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/cache/local.php b/classes/cache/local.php
index d7d0c5cb1..8ac634a3e 100644
--- a/classes/cache/local.php
+++ b/classes/cache/local.php
@@ -124,10 +124,12 @@ class Cache_Local implements Cache_Adapter {
*
* @return bool|int false if the file doesn't exist (or unreadable) or isn't audio/video, true if a plugin handled, otherwise int of bytes sent
*/
- function send_local_file(string $filename) {
+ private function send_local_file(string $filename) {
if (file_exists($filename)) {
- if (is_writable($filename)) touch($filename);
+ if (is_writable($filename) && !$this->exists('.no-auto-expiry')) {
+ touch($filename);
+ }
$tmppluginhost = new PluginHost();