Update SuggestionService

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

View file

@ -37,7 +37,10 @@ class SuggestionService {
public static function warmCache()
{
if(Redis::zcount(self::CACHE_KEY, '-inf', '+inf') == 0) {
$ids = Profile::whereNull('domain')->whereIsSuggestable(true)->pluck('id');
$ids = Profile::whereNull('domain')
->whereIsSuggestable(true)
->whereIsPrivate(false)
->pluck('id');
foreach($ids as $id) {
self::set($id);
}