From 469d49d832c750cf2e7259a0d92f354b95233ff4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 26 Dec 2021 03:46:15 -0700 Subject: [PATCH] Update site config, increase ttl and enable SPA by default --- app/Util/Site/Config.php | 12 +++--------- config/exp.php | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index e7132bc0..f78e3e43 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -7,10 +7,10 @@ use Illuminate\Support\Str; class Config { - const CACHE_KEY = 'api:site:configuration:_v0.4'; + const CACHE_KEY = 'api:site:configuration:_v0.5'; public static function get() { - return Cache::remember(self::CACHE_KEY, now()->addMinutes(5), function() { + return Cache::remember(self::CACHE_KEY, 86400, function() { return [ 'open_registration' => (bool) config_cache('pixelfed.open_registration'), 'uploader' => [ @@ -33,13 +33,7 @@ class Config { 'remote_follow' => config('federation.activitypub.remoteFollow') ], - 'ab' => [ - 'lc' => config('exp.lc'), - 'rec' => config('exp.rec'), - 'loops' => config('exp.loops'), - 'top' => config('exp.top'), - 'polls' => config('exp.polls') - ], + 'ab' => config('exp'), 'site' => [ 'name' => config_cache('app.name'), diff --git a/config/exp.php b/config/exp.php index 3db8817a..823d3a20 100644 --- a/config/exp.php +++ b/config/exp.php @@ -9,5 +9,5 @@ return [ 'polls' => env('EXP_POLLS', false), 'cached_public_timeline' => env('EXP_CPT', false), 'gps' => env('EXP_GPS', false), - 'spa' => env('EXP_SPA', false), + 'spa' => env('EXP_SPA', true), ];