The pattern cache for the SpEL matches operator only applies to expressions such as the following where the same matches operator is invoked multiple times with different input:
map.keySet().?[#this matches '.+xyz']
The pattern cache does not apply to expressions such as the following where the same pattern (.+xyz) is used in multiple matches operations:
foo matches '.+xyz' AND bar matches '.+xyz'
We should increase the scope of the regex pattern cache for the SpEL matches operator so that the cache can be reused for all matches operations for the given parser.
The pattern cache for the SpEL
matchesoperator only applies to expressions such as the following where the samematchesoperator is invoked multiple times with different input:The pattern cache does not apply to expressions such as the following where the same pattern (
.+xyz) is used in multiplematchesoperations:We should increase the scope of the regex pattern cache for the SpEL
matchesoperator so that the cache can be reused for allmatchesoperations for the given parser.