From this question, he shows that spring security manages the cache for spring boot. The spring boot documentation shows how to set the cache for resources using:
spring.resources.cache-period= # cache timeouts in headers sent to browser
cache-periodgreat for all predefined static locations for loading spring (ie /css**, /js/**, /images/**), but I also generated manifest.appcachefor offline download my static assets and because of all the above spring protection / loading sends cache cache headers with manifest.appcache
"method": "GET",
"path": "/manifest.appcache",
"response": {
"X-Application-Context": "application:local,flyway,oracle,kerberos:8080",
"Expires": "Tue, 06 Oct 2015 16:59:39 GMT",
"Cache-Control": "max-age=31556926, must-revalidate",
"status": "304"
}
, manifest.appcache. IE Chrome, , " " appcache, , FF, , , , appcache , , - .
EDIT:
WebMvcAutoConfiguration, , , , 1 spring .
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
if (!this.resourceProperties.isAddMappings()) {
logger.debug("Default resource handling disabled");
return;
}
Integer cachePeriod = this.resourceProperties.getCachePeriod();
if (!registry.hasMappingForPattern("/webjars/**")) {
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/")
.setCachePeriod(cachePeriod);
}
if (!registry.hasMappingForPattern("/**")) {
registry.addResourceHandler("/**")
.addResourceLocations(RESOURCE_LOCATIONS)
.setCachePeriod(cachePeriod);
}
}