- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.HandlerInterceptor
public class NonResourceWebContentInterceptor
extends org.springframework.web.servlet.mvc.WebContentInterceptor
This class is used to control the cache seconds. The default Spring WebContentInterceptor will apply the cacheSeconds
and associated variables to everything that goes through Spring MVC. We only want to apply the configured cache settings
to requests that go through controllers. For static resources, we will let Spring use its defaults.
Additionally, for requests for files that are known bundles, we will cache for a full 10 years, as we are generating
unique filenames that will make this acceptable.
- Author:
- Andre Azzolini (apazzolini)