From 3b90dc028974767400376f327b2522d0b2b7a8d3 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 26 Sep 2020 12:16:46 +0000 Subject: [PATCH] Use period and limit in the cache key --- src/Model/Tag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Tag.php b/src/Model/Tag.php index f5932dd60..0d6c9cfb5 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -494,7 +494,7 @@ class Tag */ public static function getGlobalTrendingHashtags(int $period, $limit = 10) { - $tags = DI::cache()->get('global_trending_tags'); + $tags = DI::cache()->get('global_trending_tags-' . $period . '-' . $limit); if (!empty($tags)) { return $tags; } else { @@ -520,7 +520,7 @@ class Tag if (DBA::isResult($tagsStmt)) { $tags = DBA::toArray($tagsStmt); - DI::cache()->set('global_trending_tags', $tags, Duration::HOUR); + DI::cache()->set('global_trending_tags-' . $period . '-' . $limit, $tags, Duration::HOUR); return $tags; }