]> git.mxchange.org Git - friendica.git/commitdiff
Tags: Use the parameters for the cache key
authorMichael <heluecht@pirati.ca>
Sun, 27 Sep 2020 08:11:43 +0000 (08:11 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 27 Sep 2020 08:11:43 +0000 (08:11 +0000)
src/Model/Tag.php

index 0d6c9cfb5106b33a72599f3d0e22f331716b9c12..c4ff34c18a5b62d9ee86787e3451f5ffccaf967e 100644 (file)
@@ -537,7 +537,7 @@ class Tag
         */
        public static function getLocalTrendingHashtags(int $period, $limit = 10)
        {
-               $tags = DI::cache()->get('local_trending_tags');
+               $tags = DI::cache()->get('local_trending_tags-' . $period . '-' . $limit);
                if (!empty($tags)) {
                        return $tags;
                } else {
@@ -563,7 +563,7 @@ class Tag
 
                if (DBA::isResult($tagsStmt)) {
                        $tags = DBA::toArray($tagsStmt);
-                       DI::cache()->set('local_trending_tags', $tags, Duration::HOUR);
+                       DI::cache()->set('local_trending_tags-' . $period . '-' . $limit, $tags, Duration::HOUR);
                        return $tags;
                }