diff --git a/src/CompilingMatcher.php b/src/CompilingMatcher.php index 46b533ca..3565bfdc 100644 --- a/src/CompilingMatcher.php +++ b/src/CompilingMatcher.php @@ -45,6 +45,17 @@ class CompilingMatcher Constraint::OP_NE => Constraint::STR_OP_NE, ); + /** + * Clears the memoization cache once you are done + * + * @return void + */ + public static function clear() + { + self::$resultCache = array(); + self::$compiledCheckerCache = array(); + } + /** * Evaluates the expression: $constraint match $operator $version *