Merge pull request #5077 from pixelfed/staging

Staging
This commit is contained in:
daniel 2024-05-07 01:06:12 -06:00 committed by GitHub
commit 64631c7233
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 135 additions and 129 deletions

View file

@ -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.
#

View file

@ -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"

View file

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

View file

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