From 66356bfd78bfb55f5215bd867c5dc81760724943 Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Thu, 9 May 2024 23:11:48 +0200 Subject: [PATCH] Use default store to cache feed --- app/Classes/Bundle.php | 4 ++-- app/Console/Commands/Bundle/Validate.php | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Classes/Bundle.php b/app/Classes/Bundle.php index 4d91bdb..a61f35b 100644 --- a/app/Classes/Bundle.php +++ b/app/Classes/Bundle.php @@ -215,7 +215,7 @@ public function repair(): bool public function touch(bool $ignoreFeed = false) { if (!$ignoreFeed) { - Cache::store('file')->forget('feed'); + Cache::forget('feed'); } $cacheKey = sprintf('render_%s', Str::slug($this->getPath())); @@ -303,7 +303,7 @@ public static function getFeedItems(FilesystemAdapter $disk) public static function renderFeed(FilesystemAdapter $disk) { - return Cache::store('file')->rememberForever('feed', function () use ($disk) { + return Cache::rememberForever('feed', function () use ($disk) { $lastBundles = static::getFeedItems($disk); return [ diff --git a/app/Console/Commands/Bundle/Validate.php b/app/Console/Commands/Bundle/Validate.php index 314c9f0..a66fef8 100644 --- a/app/Console/Commands/Bundle/Validate.php +++ b/app/Console/Commands/Bundle/Validate.php @@ -257,9 +257,7 @@ private function handleBundleHtmlValidation(Bundle $bundle, $progress) } if ($changed) { - // We do not want to keep current render in cache, but we do not - // need to forget generated feed - $bundle->touch(true); + $bundle->touch(); } }