users@glassfish.java.net

Re: Glassfish V3 RESTful Caching

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 08 Mar 2010 14:31:54 +0100

Hi,

AFAIK GlassFish has no support for HTTP caching.

You could explicitly implement an in-memory cache with JAX-RS/Jersey
in conjunction with say ehcache or coherence. In fact i am sure you
could use Jersey's resource filter feature to plug in such a solution
as you describe by defining your own cache-based annotations that are
declared on the JAX-RS resource classes.

Alternatively you might be able to utilize a Web proxy in front of the
GF server such as squid:

   http://www.squid-cache.org/

But i do not know if it supports cache invalidation on PUT/POST/
DELETE, but that seems something i would consider to be a common
requirement and may be supported.

Paul.



On Mar 8, 2010, at 8:00 AM, glassfish_at_javadesktop.org wrote:

> Hi,
> Can someone please refer me to documentation about glassfish V3 and
> caching of both HTTP response and JPA (hibernate) caching?
>
> One of the benefits everyone seem to agree on RESTful is that it is
> cacheable. Well, I would like glassfish to cache the GET response as
> long as no PUT, POST or DELETE we made. Later I can be more fine
> grane about invalidate the cache but it will be enough for now.
>
> Second thing is how to use hibernate second level cache so it will
> not be have to load object over and over again. I've read and think
> that ehCache is good choice to start with?
>
> My configuration is single server on single database so there is no
> change of data without the server know about which means it can
> invalidate cache when it knows something has changed.
>
> Thank you,
> Ido.
> [Message sent by forum member 'ido_ran' (ido.ran_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=390571
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>