mirror of
https://github.com/friendica/friendica
synced 2024-11-18 22:23:42 +00:00
Tags: Use the parameters for the cache key
This commit is contained in:
parent
26d23a3ee3
commit
fd6e750e80
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue