spring-framework / org.springframework.web.servlet.config.annotation / ResourceHandlerRegistration / setCacheControl

setCacheControl

open fun setCacheControl(cacheControl: CacheControl): ResourceHandlerRegistration

Specify the org.springframework.http.CacheControl which should be used by the resource handler.

Setting a custom value here will override the configuration set with #setCachePeriod.

Parameters

cacheControl - the CacheControl configuration to use

Return
the same ResourceHandlerRegistration instance, for chained method invocation

Since
4.2