The current implementation caches all constraint validators created through the default constraint validator factory. When using a custom constraint validator factory via usingContext(), only the validators created through the last factory in use are cached. When concurrently using two validators with different constraint validator factories, this will constantly invalidate the cache. Having a regular LRU cache which keeps the n most recently used validators (no matter what factory they are coming from), should mitigate this issue. |