mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 07:45:55 +00:00
Article::get_article_image() - provide cached URLs if possible
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user