Browse Source

Update SuggestionService

Daniel Supernault 6 năm trước cách đây
mục cha
commit
ef4a22949c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      app/Services/SuggestionService.php

+ 2 - 2
app/Services/SuggestionService.php

@@ -34,9 +34,9 @@ class SuggestionService {
 		return self::del($val);
 	}
 
-	public static function warmCache()
+	public static function warmCache($force = false)
 	{
-		if(Redis::zcount(self::CACHE_KEY, '-inf', '+inf') == 0) {
+		if(Redis::zcount(self::CACHE_KEY, '-inf', '+inf') == 0 || $force == true) {
 			$ids = Profile::whereNull('domain')
 				->whereIsSuggestable(true)
 				->whereIsPrivate(false)