mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 09:46:49 +00:00
Update ApiV1Controller, fix network timeline
This commit is contained in:
parent
f78aa1f674
commit
11e99d782f
1 changed files with 1 additions and 1 deletions
|
@ -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'));
|
||||||
|
|
Loading…
Reference in a new issue