Jersey: Default Cache Control to no-cache

前端 未结 5 2141
孤独总比滥情好
孤独总比滥情好 2020-12-25 13:35

While writing a RESTful web service, I am encountering issues if I enable any sort of caching on my client (currently a .NET thick client). By default Jersey is not sending

5条回答
  •  有刺的猬
    2020-12-25 14:04

    I think you can use the

    isNoCache(true)
    

    which will stop caching in the browser.

    See:

    http://jersey.java.net/nonav/apidocs/1.12/jersey/javax/ws/rs/core/CacheControl.html#isNoCache%28%29

    Hope this helps.

提交回复
热议问题