diff --git a/app/Jobs/FollowPipeline/UnfollowPipeline.php b/app/Jobs/FollowPipeline/UnfollowPipeline.php index 9417e535e..d80a4c02e 100644 --- a/app/Jobs/FollowPipeline/UnfollowPipeline.php +++ b/app/Jobs/FollowPipeline/UnfollowPipeline.php @@ -103,7 +103,7 @@ class UnfollowPipeline implements ShouldQueue }); } - if ($actorProfile->domain == null && config('instance.timeline.home.cached')) { + if ($actorProfile->domain == null) { Cache::forget('pf:timelines:home:'.$actor); } diff --git a/app/Observers/FollowerObserver.php b/app/Observers/FollowerObserver.php index 02959e992..49d3045d8 100644 --- a/app/Observers/FollowerObserver.php +++ b/app/Observers/FollowerObserver.php @@ -16,9 +16,7 @@ class FollowerObserver */ public function created(Follower $follower) { - if (config('instance.timeline.home.cached')) { - Cache::forget('pf:timelines:home:'.$follower->profile_id); - } + Cache::forget('pf:timelines:home:'.$follower->profile_id); FollowerService::add($follower->profile_id, $follower->following_id); FeedFollowPipeline::dispatch($follower->profile_id, $follower->following_id)->onQueue('follow'); diff --git a/app/Observers/StatusObserver.php b/app/Observers/StatusObserver.php index 910ad932e..170799d46 100644 --- a/app/Observers/StatusObserver.php +++ b/app/Observers/StatusObserver.php @@ -40,9 +40,7 @@ class StatusObserver return; } - if (config('instance.timeline.home.cached')) { - Cache::forget('pf:timelines:home:'.$status->profile_id); - } + Cache::forget('pf:timelines:home:'.$status->profile_id); if (in_array($status->scope, ['public', 'unlisted']) && in_array($status->type, ['photo', 'photo:album', 'video'])) { ProfileStatusService::add($status->profile_id, $status->id); @@ -60,9 +58,7 @@ class StatusObserver return; } - if (config('instance.timeline.home.cached')) { - Cache::forget('pf:timelines:home:'.$status->profile_id); - } + Cache::forget('pf:timelines:home:'.$status->profile_id); ProfileStatusService::delete($status->profile_id, $status->id); diff --git a/config/instance.php b/config/instance.php index 3a42b30d7..809edf090 100644 --- a/config/instance.php +++ b/config/instance.php @@ -25,7 +25,7 @@ return [ 'timeline' => [ 'home' => [ - 'cached' => env('PF_HOME_TIMELINE_CACHE', false), + 'cached' => env('PF_HOME_TIMELINE_CACHE', true), 'cache_ttl' => env('PF_HOME_TIMELINE_CACHE_TTL', 86400), 'cache_dropoff' => env('PF_HOME_TIMELINE_CACHE_DROPOFF', 800), ],