diff --git a/src/Tags/Cache.php b/src/Tags/Cache.php index a487ce115a..8ac7e1215b 100644 --- a/src/Tags/Cache.php +++ b/src/Tags/Cache.php @@ -13,11 +13,17 @@ public function index() return []; } - if ($cached = LaraCache::get($key = $this->getCacheKey())) { + $store = LaraCache::store(); + + if (count($tags = $this->params->explode('tags', []))) { + $store = $store->tags($tags); + } + + if ($cached = $store->get($key = $this->getCacheKey())) { return $cached; } - LaraCache::put($key, $html = (string) $this->parse([]), $this->getCacheLength()); + $store->put($key, $html = (string) $this->parse([]), $this->getCacheLength()); return $html; }