This topic has not yet been written. The content below is from the topic description.
Here's an example of using the client cache with the Client Proxy Framework @Path("/orders") public interface OrderServiceClient { @Path("{id}") @GET @Produces("application/xml") public Order getOrder(@PathParam("id") String id); } To create a proxy for this interface and enable caching for that proxy requires only a few simple steps: import org.jboss.resteasy.client.ProxyFactory; import org.jboss.resteasy.client.cache.CacheFactory; import org.jboss.resteasy.client.cache.LightweightBrowserCache; public static void main(String[] args) throws Exception { RegisterBuiltin.register(ResteasyProviderFactory.getInstance()); OrderServiceClient proxy = ProxyFactory.create(OrderServiceClient.class, generateBaseUrl()); // This line enables caching LightweightBrowserCache cache = CacheFactory.makeCacheable(proxy); } If you are using the ClientRequest class to make invocations rather than the proxy framework, it is just as easy import org.jboss.resteasy.client.ProxyFactory; import org.jboss.resteasy.client.cache.CacheFactory; import org.jboss.resteasy.client.cache.LightweightBrowserCache; public static void main(String[] args) throws Exception { RegisterBuiltin.register(ResteasyProviderFactory.getInstance()); // This line enables caching LightweightBrowserCache cache = new LightweightBrowserCache(); ClientRequest request = new ClientRequest("http://example.com/orders/333"); CacheFactory.makeCacheable(request, cache); }