-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Thomas Tardy opened SPR-13780 and commented
We are migrating a project from spring-web 4.1.8 to 4.2.3 and need to replace the deprecated code
WebContentInterceptor interceptor = new WebContentInterceptor();
interceptor.setCacheSeconds(0);
interceptor.setUseExpiresHeader(true);
interceptor.setUseCacheControlHeader(true);
interceptor.setUseCacheControlNoStore(true);
with the usage of the new CacheControl
and interceptor.setCacheControl(cacheControl)
.
But with the new API of CacheControl
, you cannot use noStore()
and noCache()
together as these methods return a new CacheControl
and aren't updating the existing ones.
As it is still required to set the Cache-Control
header to no-store, no-cache
to disable caching in different browsers, this should be possible.
Affects: 4.2.3
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement