Skip to content

Commit

Permalink
fix: remove logging, not neccessary (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Nov 14, 2023
1 parent 5b02a52 commit a67a4d0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Listener/ClearCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@
use IanM\HtmlHead\Header;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Events\Dispatcher;
use Psr\Log\LoggerInterface;

class ClearCache
{
public $cache;
public $logger;

public function __construct(Cache $cache, LoggerInterface $logger)
public function __construct(Cache $cache)
{
$this->cache = $cache;
$this->logger = $logger;
}

public function subscribe(Dispatcher $events)
Expand All @@ -40,6 +37,5 @@ public function subscribe(Dispatcher $events)
public function clearCache($event)
{
$this->cache->forget(Header::CACHE_KEY);
$this->logger->info('[ianm/html-head] Cleared cache for '.Header::CACHE_KEY.' due to '.get_class($event).' event firing.');
}
}

0 comments on commit a67a4d0

Please sign in to comment.