mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-12-07 14:00:59 +01:00
Article::get_article_image() - provide cached URLs if possible
This commit is contained in:
parent
150b040dad
commit
ffb842f752
@ -875,6 +875,14 @@ class Article extends Handler_Protected {
|
||||
}
|
||||
}
|
||||
|
||||
$cache = new DiskCache("images");
|
||||
|
||||
if ($cache->exists(sha1($article_image)))
|
||||
$article_image = $cache->getUrl(sha1($article_image));
|
||||
|
||||
if ($cache->exists(sha1($article_stream)))
|
||||
$article_stream = $cache->getUrl(sha1($article_stream));
|
||||
|
||||
return [$article_image, $article_stream];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user