diff --git a/CHANGELOG.md b/CHANGELOG.md index 8434f044..bf510fa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Changed - Tracked element queries that have invalid params or that cannot be executed are now deleted when refreshing the cache. +- Reverted deleting expired URIs from the database immediately when refreshing expired cache, as it can cause cached pages not to be refreshed ([#624](https://github.com/putyourlightson/craft-blitz/issues/624)). + ## 4.11.2 - 2024-02-19 diff --git a/src/services/RefreshCacheService.php b/src/services/RefreshCacheService.php index 85387ba4..be0bf0b8 100755 --- a/src/services/RefreshCacheService.php +++ b/src/services/RefreshCacheService.php @@ -476,9 +476,6 @@ public function refreshExpiredCache(): void $cacheIds = Blitz::$plugin->expireCache->getExpiredCacheIds(); $this->addCacheIds($cacheIds); - // Delete the cache records now, as they may not be deleted later. - CacheRecord::deleteAll(['id' => $cacheIds]); - // Check for expired elements to invalidate /** @var ElementExpiryDateRecord[] $elementExpiryDates */ $elementExpiryDates = ElementExpiryDateRecord::find()