Java org.springframework.web.servlet.mvc WebContentInterceptor fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.web.servlet.mvc WebContentInterceptor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.web.servlet.mvc WebContentInterceptor.

The text is from its open source code.

Constructor

Method

voidsetCacheMappings(Properties cacheMappings)
Map specific URL paths to specific cache seconds.
voidsetCacheSeconds(int seconds)
Cache content for the given number of seconds, by writing cache-related HTTP headers to the response:
  • seconds == -1 (default value): no generation cache-related headers
  • seconds == 0: "Cache-Control: no-store" will prevent caching
  • seconds > 0: "Cache-Control: max-age=seconds" will ask to cache content

For more specific needs, a custom org.springframework.http.CacheControl should be used.

voidsetUseCacheControlHeader(boolean useCacheControlHeader)
Set whether to use the HTTP 1.1 cache-control header.
voidsetUseCacheControlNoStore(boolean useCacheControlNoStore)
Set whether to use the HTTP 1.1 cache-control header value "no-store" when preventing caching.
voidsetUseExpiresHeader(boolean useExpiresHeader)
Set whether to use the HTTP 1.0 expires header.