Class CachePolicies


  • public class CachePolicies
    extends Object
    Utilities to set cache policies for a request.
    Since:
    9.4
    • Constructor Detail

      • CachePolicies

        public CachePolicies()
    • Method Detail

      • cacheFor

        public static void cacheFor​(javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                                    long timeSpanInSecond)
      • cached

        public static javax.ws.rs.core.Response cached​(javax.ws.rs.core.Response.ResponseBuilder responseBuilder,
                                                       long timeSpanInSecond)
      • setCacheControl

        public static void setCacheControl​(javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                                           String value)
      • setCacheControl

        public static javax.ws.rs.core.Response.ResponseBuilder setCacheControl​(javax.ws.rs.core.Response.ResponseBuilder responseBuilder,
                                                                                String value)
      • setPragma

        public static void setPragma​(javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                                     String value)
      • setPragma

        public static javax.ws.rs.core.Response.ResponseBuilder setPragma​(javax.ws.rs.core.Response.ResponseBuilder responseBuilder,
                                                                          String value)
      • setExpiration

        public static void setExpiration​(javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                                         long value)
      • setExpiration

        public static javax.ws.rs.core.Response.ResponseBuilder setExpiration​(javax.ws.rs.core.Response.ResponseBuilder responseBuilder,
                                                                              long value)