Browse Source

Update site config, increase ttl and enable SPA by default

Daniel Supernault 3 years ago
parent
commit
469d49d832
2 changed files with 4 additions and 10 deletions
  1. 3 9
      app/Util/Site/Config.php
  2. 1 1
      config/exp.php

+ 3 - 9
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'),

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