From 949b2a21c31caaefd86e7305cbdcd0f2625919ed Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Fri, 2 Jul 2021 16:31:46 +0545 Subject: [PATCH] add gravity to cache key --- app/controllers/api/storage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 3adb03104..df4064ea6 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -280,7 +280,7 @@ App::get('/v1/storage/files/:fileId/preview') $fileLogos = Config::getParam('storage-logos'); $date = \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)).' GMT'; // 45 days cache - $key = \md5($fileId.$width.$height.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output); + $key = \md5($fileId.$width.$height.$gravity.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output); $file = $projectDB->getDocument($fileId); @@ -300,7 +300,7 @@ App::get('/v1/storage/files/:fileId/preview') $cipher = null; $background = (empty($background)) ? 'eceff1' : $background; $type = \strtolower(\pathinfo($path, PATHINFO_EXTENSION)); - $key = \md5($path.$width.$height.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output); + $key = \md5($path.$width.$height.$gravity.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output); } $compressor = new GZIP();