Skip to content

Commit

Permalink
feat: add support for no config
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Mar 11, 2024
1 parent 72ec0e1 commit 6dec59a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/CacheInclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ class CacheInclude
* @param ConfigInterface $config
* @param bool $forceExpire
*/
public function __construct(ConfigInterface $config, $forceExpire = false)
public function __construct(ConfigInterface $config = null, $forceExpire = false)
{
$this->cache = Injector::inst()->get(CacheInterface::class . '.CacheInclude');
$this->config = $config;

if ($config) {
$this->config = $config;
}

$this->forceExpire = $forceExpire;
}

Expand Down

0 comments on commit 6dec59a

Please sign in to comment.