kopia lustrzana https://github.com/pixelfed/pixelfed
Update ConfigCacheService, fail to fallback earlier
rodzic
251e455c25
commit
488561c270
|
@ -39,6 +39,10 @@ class ImageOptimize implements ShouldQueue
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
if(config('pixelfed.optimize_image') == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$media = $this->media;
|
||||
$path = storage_path('app/'.$media->media_path);
|
||||
if (!is_file($path) || $media->skip_optimize) {
|
||||
|
|
|
@ -14,6 +14,9 @@ class ConfigCacheService
|
|||
{
|
||||
$cacheKey = self::CACHE_KEY . $key;
|
||||
$ttl = now()->addHours(12);
|
||||
if(!config('instance.enable_cc')) {
|
||||
return config($key);
|
||||
}
|
||||
|
||||
return Cache::remember($cacheKey, $ttl, function() use($key) {
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue