Hi Rice
On 01/05/14 07:21, Rice Yeh wrote:
Hi Sergey,
   My idea is quite simple. I put any (jaxrs) resource method, which is
subject to cache, an annotation called @Cacheable. Then I override the
JAXRSInvoker's invoke(Exchange exchange, Object serviceObject, Method m,
List<Object> params)  to check wthether the method m is annotated
with@Cacheable. If it is but not cahced yet, call super.invoke(..)  and
cache the result with the request's uri as key. For next resource access
with the same uri, the cached result is served.
   The cache is important to my ap because it takes long time to come out
the result. In terms of cxf, maybe the out Message is all i need to put in
cache.
Sure it makes sense.
Consider also working with Request check pre-condition methods which check etags and dates.
JAX-RS 2.0 AsynceResponse can also be useful in such contexts...

Cheers, Sergey

Rice


On Tue, Apr 29, 2014 at 9:40 PM, Sergey Beryozkin <[email protected]>wrote:

Hi Rice


On 29/04/14 11:02, Rice Yeh wrote:

Hi,
    Is there server cache implementation based on apache's jcs and
JAXRSInvoker. I know that there is a mention in documentation that is
based
on ehcache and servlet filter.

I'm not aware of any concrete integrations between JCS and JAXRSInvoker.
Do you think it makes sense ? May be you can experiment and let us know
how it works out ?
Cheers, Sergey


Rice




Reply via email to