Created
February 20, 2015 09:20
-
-
Save abhirockzz/475368f2822e16021831 to your computer and use it in GitHub Desktop.
Create a CacheControl instance manually
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Path("/testcache") | |
public class RESTfulResource { | |
@GET | |
@Produces("text/plain") | |
public Response find(){ | |
CacheControl cc = new CacheControl(); | |
cc.setMaxAge(20); | |
return Response.ok(UUID.randomUUID().toString()).cacheControl(cc).build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment