Skip to content

Commit

Permalink
Merge pull request #77 from chillbram/patch-1
Browse files Browse the repository at this point in the history
Fix breaking change cache duration
  • Loading branch information
freekmurze authored Apr 22, 2024
2 parents 743c6ed + a7beb3d commit 66660b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/MarkdownRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ public function toHtml(string $markdown): string

$cacheKey = $this->getCacheKey($markdown);

if($this->cacheDuration === null) {
return cache()->rememberForever($cacheKey, function () use ($markdown) {
return $this->convertMarkdownToHtml($markdown);
});
if ($this->cacheDuration === null) {
return cache()
->store($this->cacheStoreName)
->rememberForever($cacheKey, function () use ($markdown) {
return $this->convertMarkdownToHtml($markdown);
});
}

return cache()
Expand Down

0 comments on commit 66660b2

Please sign in to comment.