Prechádzať zdrojové kódy

Update HashtagService, reduce cached_count cache ttl

Daniel Supernault 1 rok pred
rodič
commit
15f29f7d79
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/Services/HashtagService.php

+ 1 - 1
app/Services/HashtagService.php

@@ -29,7 +29,7 @@ class HashtagService
 
 
     public static function count($id)
     public static function count($id)
     {
     {
-        return Cache::remember('services:hashtag:public-count:by_id:' . $id, 3600, function() use($id) {
+        return Cache::remember('services:hashtag:total-count:by_id:' . $id, 300, function() use($id) {
             $tag = Hashtag::find($id);
             $tag = Hashtag::find($id);
             return $tag ? $tag->cached_count ?? 0 : 0;
             return $tag ? $tag->cached_count ?? 0 : 0;
         });
         });