From f5ecfd135f2117705fd9a49352616512849242be Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Mon, 1 Jun 2020 17:17:09 -0700 Subject: [PATCH] Prefix markdown cache key --- app/src/ViewFunctions/Markdown.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/ViewFunctions/Markdown.php b/app/src/ViewFunctions/Markdown.php index 72f7270..42590c0 100644 --- a/app/src/ViewFunctions/Markdown.php +++ b/app/src/ViewFunctions/Markdown.php @@ -31,8 +31,11 @@ class Markdown extends ViewFunction */ public function __invoke(string $string): string { - return $this->cache->get(md5($string), function () use ($string): string { - return $this->parser->parse($string); - }); + return $this->cache->get( + sprintf('markdown-%s', md5($string)), + function () use ($string): string { + return $this->parser->parse($string); + } + ); } }