I am new to Spring and working on one of my interesting project that helps you track mobile numbers in India and celebrities around the world writing an interceptor where I need to manage cache and return the data from cache if the response is already available in cache. I am using the below example : protected CacheControl lookupCacheControl(String urlPath) { CacheControl cacheControl = this.cacheControlMappings.get(urlPath); if (cacheControl != null) { return cacheControl; } for (String registeredPath...
I am new to Spring and writing an interceptor where I need to manage cache and return the data from cache if the response is already available in cache. I am using the below example : protected CacheControl lookupCacheControl(String urlPath) { CacheControl cacheControl = this.cacheControlMappings.get(urlPath); if (cacheControl != null) { return cacheControl; } for (String registeredPath : this.cacheControlMappings.keySet()) { if (this.pathMatcher.match(registeredPath, urlPath)) { return this.cacheControlMappings.get(registeredPath);...