Sfoglia il codice sorgente

Update FollowerService, reduce localFollowerIds ttl

Daniel Supernault 1 anno fa
parent
commit
de2b5ba4e9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      app/Services/FollowerService.php

+ 1 - 1
app/Services/FollowerService.php

@@ -217,7 +217,7 @@ class FollowerService
 	public static function localFollowerIds($pid, $limit = 0)
 	public static function localFollowerIds($pid, $limit = 0)
 	{
 	{
 		$key = self::FOLLOWERS_LOCAL_KEY . $pid;
 		$key = self::FOLLOWERS_LOCAL_KEY . $pid;
-		$res = Cache::remember($key, 86400, function() use($pid) {
+		$res = Cache::remember($key, 7200, function() use($pid) {
 			return DB::table('followers')->whereFollowingId($pid)->whereLocalProfile(true)->pluck('profile_id')->sort();
 			return DB::table('followers')->whereFollowingId($pid)->whereLocalProfile(true)->pluck('profile_id')->sort();
 		});
 		});
 		return $limit ?
 		return $limit ?