Skip to main content

Jersey Client: Cache-Manager for Conditional GET?



Jersey has wonderful support for server-side handling of Preconditions to respond to a Conditional-GET-request.





On the client-side it seems a bit less elegant/manual. As far as I know you'd need to store the metadata of the entity yourself (etag, last-modified header) and make a decision, when to set which headers, evaluate the response code, update your local cache of entity/metadata ... etc.





Do you know of a ready, free implementation that wraps up the conditonal GET? I found this example , where the poster is using CacheManager and CacheEntry ; I suspect his own implementation. Shouldn't this be part of Jersey Client itself?


Comments

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.