Modified the ExpressiveValidator class to use MemoryCache for caching rather than the original custom ProcessStorage and RequestStorage classes.
The RequestCache wrapper class is used to allow that cache to be scoped to the request. Both caches are injected via the HttpRequest in the Attribute classes, then passed to the Validator.
The registration of the cache services in the Sample Project is updated to use MemoryCache, and this is abstracted into an extension method.
Documentation is also updated to reflect the simplified mechanism of registering ExpressiveAnnotations via the extension method.
Modified the ExpressiveValidator class to use MemoryCache for caching rather than the original custom ProcessStorage and RequestStorage classes.
The RequestCache wrapper class is used to allow that cache to be scoped to the request. Both caches are injected via the HttpRequest in the Attribute classes, then passed to the Validator.
The registration of the cache services in the Sample Project is updated to use MemoryCache, and this is abstracted into an extension method.
Documentation is also updated to reflect the simplified mechanism of registering ExpressiveAnnotations via the extension method.