public void cacheExample() {
    Client client = ClientFactory.newClient();
    client.configuration().register(CachingFeature.class);

    Target resource = client.target("http://example.com/foo/bar.txt");

    String text = resource.request("text/plain").get(String.class);
    String second = resource.request("text/plain").get(String.class);

    System.out.println(text);
    System.out.println(second);
  }
 public AccountResource(Target target, Properties properties) {
   super(target, properties);
   if (Boolean.parseBoolean(properties.getProperty("verbose"))) {
     target.configuration().register(loggingFilter);
   }
 }