mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #4406 from pixelfed/staging
Update PublicTimelineService, improve warmCache query
This commit is contained in:
commit
24afe169ad
|
@ -51,6 +51,7 @@
|
|||
- Update scheduler, fix S3 media garbage collection not being executed when cloud storage is enabled via dashboard without .env/config being enabled ([adb070f1](https://github.com/pixelfed/pixelfed/commit/adb070f1))
|
||||
- Update MediaController, add fallback for local files that are later stored on S3 but still are referenced in cached objects remotely ([4973cb46](https://github.com/pixelfed/pixelfed/commit/4973cb46))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
- Update PublicTimelineService, improve warmCache query ([9f901d65](https://github.com/pixelfed/pixelfed/commit/9f901d65))
|
||||
|
||||
## [v0.11.6 (2023-05-03)](https://github.com/pixelfed/pixelfed/compare/v0.11.5...v0.11.6)
|
||||
|
||||
|
|
|
@ -77,12 +77,12 @@ class PublicTimelineService {
|
|||
if(self::count() == 0 || $force == true) {
|
||||
$hideNsfw = config('instance.hide_nsfw_on_public_feeds');
|
||||
Redis::del(self::CACHE_KEY);
|
||||
$ids = Status::whereNull('uri')
|
||||
->whereNull('in_reply_to_id')
|
||||
$minId = SnowflakeService::byDate(now()->subDays(14));
|
||||
$ids = Status::where('id', '>', $minId)
|
||||
->whereNull(['uri', 'in_reply_to_id', 'reblog_of_id'])
|
||||
->when($hideNsfw, function($q, $hideNsfw) {
|
||||
return $q->where('is_nsfw', false);
|
||||
})
|
||||
->whereNull('reblog_of_id')
|
||||
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
|
||||
->whereScope('public')
|
||||
->orderByDesc('id')
|
||||
|
|
Loading…
Reference in New Issue