update: rss cache key

RSS feed caching should be done by id, not by user, otherwise it wouldn't be cached when multiple users use the same feed.
This commit is contained in:
Roardom
2022-12-04 05:05:27 +00:00
committed by GitHub
parent ff78197422
commit 6d429da33d
+1 -1
View File
@@ -165,7 +165,7 @@ class RssController extends Controller
$search = $rss->object_torrent;
$cacheKey = \md5(\sprintf('%s.%s.%s', $rss->id, $user->id, $user->rsskey));
$cacheKey = 'rss:'.$rss->id;
$torrents = \cache()->remember($cacheKey, 300, function () use ($search, $user) {
return Torrent::with('user', 'category', 'type', 'resolution')