1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 02:06:52 +00:00

Update ApiV1Controller, fix network timeline

This commit is contained in:
Daniel Supernault 2022-06-15 01:10:39 -06:00
parent f78aa1f674
commit 11e99d782f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1984,7 +1984,7 @@ class ApiV1Controller extends Controller
$remote = ($request->has('remote') && $request->input('remote') == true) || ($request->filled('local') && $request->input('local') != true); $remote = ($request->has('remote') && $request->input('remote') == true) || ($request->filled('local') && $request->input('local') != true);
$filtered = $user ? UserFilterService::filters($user->profile_id) : []; $filtered = $user ? UserFilterService::filters($user->profile_id) : [];
if($remote && config('instance.timeline.network.cached')) { if((!$request->has('local') || $remote) && config('instance.timeline.network.cached')) {
Cache::remember('api:v1:timelines:network:cache_check', 10368000, function() { Cache::remember('api:v1:timelines:network:cache_check', 10368000, function() {
if(NetworkTimelineService::count() == 0) { if(NetworkTimelineService::count() == 0) {
NetworkTimelineService::warmCache(true, config('instance.timeline.network.cache_dropoff')); NetworkTimelineService::warmCache(true, config('instance.timeline.network.cache_dropoff'));