|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.WebContentInterceptor
org.broadleafcommerce.core.web.interceptor.NonResourceWebContentInterceptor
public class NonResourceWebContentInterceptor
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.
| Field Summary | |
|---|---|
protected static int |
TEN_YEARS_SECONDS
|
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
NonResourceWebContentInterceptor()
|
|
| Method Summary | |
|---|---|
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
|
| Methods inherited from class org.springframework.web.servlet.mvc.WebContentInterceptor |
|---|
afterCompletion, lookupCacheSeconds, postHandle, setAlwaysUseFullPath, setCacheMappings, setPathMatcher, setUrlDecode, setUrlPathHelper |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int TEN_YEARS_SECONDS
| Constructor Detail |
|---|
public NonResourceWebContentInterceptor()
| Method Detail |
|---|
public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws javax.servlet.ServletException
preHandle in interface org.springframework.web.servlet.HandlerInterceptorpreHandle in class org.springframework.web.servlet.mvc.WebContentInterceptorjavax.servlet.ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||