From 31606d5c50b1b01396ee93ea9639a55652b74b99 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Thu, 4 Apr 2024 21:21:31 +0200 Subject: [PATCH] Swap maxEntries and maxAgeInSeconds arguments The arguments maxEntries and maxAgeInSeconds in the ExpirationPlugin::create() function have been swapped. This change fixes the data misalignment which was causing issues with data retention in the GoogleFontCache. --- src/CachingStrategy/GoogleFontCache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CachingStrategy/GoogleFontCache.php b/src/CachingStrategy/GoogleFontCache.php index 94cf243..7369dd4 100644 --- a/src/CachingStrategy/GoogleFontCache.php +++ b/src/CachingStrategy/GoogleFontCache.php @@ -44,8 +44,8 @@ public function getCacheStrategies(): array ->withPlugin( CacheableResponsePlugin::create(), ExpirationPlugin::create( - $this->workbox->googleFontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365, - $this->workbox->googleFontCache->maxEntries ?? 30 + $this->workbox->googleFontCache->maxEntries ?? 30, + $this->workbox->googleFontCache->maxAgeInSeconds() ?? 60 * 60 * 24 * 365 ), ), ];