On Aug 26, 2008, at 7:41 PM, Markus KARG wrote:
> Paul,
>> In relation to Travis's point about the server-side, i also think
>> technologies like Ehcache are interesting, especially to avoid DB
>> queries or say to help with fast look up of etag last-modified
>> data (e.g. like memcached), so there may be something that could
>> also be done with Jersey/Ehcache for conditional GET/PUT/DELETE.
> The question is whether that is useful.
Note that i am not referring to an HTTP cache. For *conditional* GET/
PUT/DELETE the application determines the etag and last-modified date
and the application returns a 304 Not Modified or the content for a
GET or returns a 412 Precondition failed for a PUT/DELETE.
Essentially the Ehcache can be used as an efficient hash table of key
(uri) to etag/last-modified. A conditional GET will check the cache.
A PUT/DELETE will modify/clear the cache. IIRC Rails does something
using memcached.
It is possible to do the same with SQUID?
Paul.
> One can add a SQUID reverse proxy before the original JAX-RS
> resource, so if max-age is high enough this will move a big load
> from the resource to the proxy. Also, I see the job of caching to
> be not JAX-RS specific -- if it is implemented, then it should be
> implemented in the surrounding driver (GlassFish), shouldn't it? I
> mean, in that case it would boost non-JAX-RS resources, too.
>