title: Caching REST API (JAX-RS)
body: <p>I want to improve performance in my REST API, I have been reading about HTTP caching but I think that don't understand the concept. If I have this resource:</p>
  
  <pre><code>    @GET
      @Path("/test")
      @Produces(MediaType.APPLICATION_JSON)
      public Response test() {
          Car car = new Car();
          car.setName("Just a car");
  
          CacheControl cc = new CacheControl();
          cc.setMaxAge(86400);
  
          Response.ResponseBuilder builder = Response.ok(car);
          builder.cacheControl(cc);
          return builder.build();
      }
  </code></pre>
  
  <p>What does it exactly mean? Does it mean that the petition won't be performed again until max age is reached? Or have I to handle Cache-Control header manually in the client? I'm confused, help me to understand it.</p>
  
  <p>Thanks.</p>