Skip to content

Commit

Permalink
Swap maxEntries and maxAgeInSeconds arguments
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Spomky committed Apr 4, 2024
1 parent 3713ae1 commit 31606d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CachingStrategy/GoogleFontCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
),
];
Expand Down

0 comments on commit 31606d5

Please sign in to comment.