Update SuggestionService

This commit is contained in:
Daniel Supernault 2019-04-28 17:43:55 -06:00
parent c680c52060
commit ef4a22949c
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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)