Browse Source

Update StatusHashtagService, reduce cached hashtag count ttl from 6 hours to 5 minutes

Daniel Supernault 5 years ago
parent
commit
126886e841
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Services/StatusHashtagService.php

+ 1 - 1
app/Services/StatusHashtagService.php

@@ -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();
 		});
 		});