开发者

Cache-Control: private in Spring-MVC

开发者 https://www.devze.com 2023-03-30 05:25 出处:网络
WebContentInterceptor is nice, but I can\'t find how to make it add the \"private\" directive to the CacheControl HTTP header.

WebContentInterceptor is nice, but I can't find how to make it add the "private" directive to the CacheControl HTTP header. I either need to subclass it, or use response.setHeader in my controllers.

Is there any other convenient way to do this?

Preferably something a开发者_运维技巧nnotation based :-)


Try https://github.com/foo4u/spring-mvc-cache-control. And it's annotation based :D.

It seems that Spring is taking into account adding this in a future version: https://jira.springsource.org/browse/SPR-7129.

Meantime, it seems that it's included in v4.2.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号