1
0

Use default store to cache feed

This commit is contained in:
Richard Dern 2024-05-09 23:11:48 +02:00
parent 84751a7384
commit 66356bfd78
2 changed files with 3 additions and 5 deletions

View File

@ -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 [

View File

@ -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();
}
}