mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
commit
64631c7233
4 changed files with 135 additions and 129 deletions
|
@ -67,7 +67,7 @@ ADMIN_DOMAIN="${APP_DOMAIN}"
|
|||
# @default "false"
|
||||
# @see https://docs.pixelfed.org/technical-documentation/config/#config_cache
|
||||
# @dottie/validate required,boolean
|
||||
ENABLE_CONFIG_CACHE="false"
|
||||
ENABLE_CONFIG_CACHE="true"
|
||||
|
||||
# Enable/disable new local account registrations.
|
||||
#
|
||||
|
|
|
@ -8,7 +8,7 @@ OPEN_REGISTRATION="false"
|
|||
ENFORCE_EMAIL_VERIFICATION="false"
|
||||
PF_MAX_USERS="1000"
|
||||
OAUTH_ENABLED="true"
|
||||
ENABLE_CONFIG_CACHE=false
|
||||
ENABLE_CONFIG_CACHE=true
|
||||
|
||||
# Media Configuration
|
||||
PF_OPTIMIZE_IMAGES="true"
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.12.0...dev)
|
||||
|
||||
### Updates
|
||||
- Update ApiV1Dot1Controller, fix in app registration bug that prevents proper auth flow due to missing oauth scopes ([cbf996c9](https://github.com/pixelfed/pixelfed/commit/cbf996c9))
|
||||
- Update ConfigCacheService, fix database race condition and fallback to file config and enable by default ([60a62b59](https://github.com/pixelfed/pixelfed/commit/60a62b59))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.12.0 (2024-04-29)](https://github.com/pixelfed/pixelfed/compare/v0.11.13...v0.12.0)
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Services;
|
|||
|
||||
use App\Models\ConfigCache as ConfigCacheModel;
|
||||
use Cache;
|
||||
use Illuminate\Database\QueryException;
|
||||
|
||||
class ConfigCacheService
|
||||
{
|
||||
|
@ -25,8 +26,8 @@ class ConfigCacheService
|
|||
return config($key);
|
||||
}
|
||||
|
||||
try {
|
||||
return Cache::remember($cacheKey, $ttl, function () use ($key) {
|
||||
|
||||
$allowed = [
|
||||
'app.name',
|
||||
'app.short_description',
|
||||
|
@ -175,6 +176,9 @@ class ConfigCacheService
|
|||
|
||||
return $v;
|
||||
});
|
||||
} catch (Exception | QueryException $e) {
|
||||
return config($key);
|
||||
}
|
||||
}
|
||||
|
||||
public static function put($key, $val)
|
||||
|
|
Loading…
Reference in a new issue