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
This commit is contained in:
fox 2022-12-20 08:22:21 +03:00
commit 423b26afc5
1 changed files with 4 additions and 2 deletions

View File

@ -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();