Skip to content

Commit

Permalink
Allow not having a cache fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Jan 23, 2018
1 parent 06f0afc commit f8a1cdc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Cache/Cache.php
Expand Up @@ -178,6 +178,10 @@ protected static function _buildEngine($name)
return;
}

if ($config['fallback'] === false) {
throw $e;
}

if ($config['fallback'] === $name) {
throw new InvalidArgumentException(sprintf('"%s" cache configuration cannot fallback to itself.', $name), null, $e);
}
Expand Down

0 comments on commit f8a1cdc

Please sign in to comment.