Skip to content
Snippets Groups Projects
Commit ffb842f7 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

Article::get_article_image() - provide cached URLs if possible

parent 150b040d
No related branches found
No related tags found
No related merge requests found
...@@ -875,6 +875,14 @@ class Article extends Handler_Protected { ...@@ -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]; return [$article_image, $article_stream];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment