Browse Source

Allow not having a cache fallback

Andy Dawson 8 years ago
parent
commit
f8a1cdcbdc
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Cache/Cache.php

+ 4 - 0
src/Cache/Cache.php

@@ -178,6 +178,10 @@ class Cache
                 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);
             }