mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update Config, use config_cache
This commit is contained in:
parent
5e4d4eff9d
commit
7785a2dae4
1 changed files with 7 additions and 1 deletions
|
@ -32,7 +32,7 @@ class Config
|
|||
'uploader' => [
|
||||
'max_photo_size' => (int) config('pixelfed.max_photo_size'),
|
||||
'max_caption_length' => (int) config_cache('pixelfed.max_caption_length'),
|
||||
'max_altext_length' => (int) config('pixelfed.max_altext_length', 150),
|
||||
'max_altext_length' => (int) config_cache('pixelfed.max_altext_length', 150),
|
||||
'album_limit' => (int) config_cache('pixelfed.max_album_length'),
|
||||
'image_quality' => (int) config_cache('pixelfed.image_quality'),
|
||||
|
||||
|
@ -102,6 +102,12 @@ class Config
|
|||
});
|
||||
}
|
||||
|
||||
public static function refresh()
|
||||
{
|
||||
Cache::forget(self::CACHE_KEY);
|
||||
return self::get();
|
||||
}
|
||||
|
||||
public static function json()
|
||||
{
|
||||
return json_encode(self::get(), JSON_FORCE_OBJECT);
|
||||
|
|
Loading…
Reference in a new issue