1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pixelfed_ynh.git synced 2024-09-03 20:06:04 +02:00

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)