mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-21 22:11:26 +00:00
Update StatusHashtagService, reduce cached hashtag count ttl from 6 hours to 5 minutes
This commit is contained in:
parent
634910c3ca
commit
126886e841
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ class StatusHashtagService {
|
||||||
public static function count($id)
|
public static function count($id)
|
||||||
{
|
{
|
||||||
$key = 'pf:services:status-hashtag:count:' . $id;
|
$key = 'pf:services:status-hashtag:count:' . $id;
|
||||||
$ttl = now()->addHours(6);
|
$ttl = now()->addMinutes(5);
|
||||||
return Cache::remember($key, $ttl, function() use($id) {
|
return Cache::remember($key, $ttl, function() use($id) {
|
||||||
return StatusHashtag::whereHashtagId($id)->count();
|
return StatusHashtag::whereHashtagId($id)->count();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue