Update site config, increase ttl and enable SPA by default

This commit is contained in:
Daniel Supernault 2021-12-26 03:46:15 -07:00
parent d9551fc3b7
commit 469d49d832
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 4 additions and 10 deletions

View file

@ -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'),

View file

@ -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),
];