Hello all,

I have some concerns about CacheControlInterceptor:

1. I was debugging and I found CacheControlInterceptor has only one
CacheControl instance, with the values of the last initCacheControl method
call, which means, if I have, for example, two classes @Cache annotated,
with different values, CacheControlInterceptor on postProcess, will always
return the same values for all requests.

In code, this is the mentioned example:

@Path("/foo")
@Cache(*maxAge = 3600, sMaxAge = 3600*, mustRevalidate = false,
proxyRevalidate = true, isPrivate = false, noTransform = true)
public class Resource1 {

  @GET
  public String getFoo() {
    ...
  }
}

@Path("/bar")
@Cache(*maxAge = 500, sMaxAge = 500*, mustRevalidate = false,
proxyRevalidate = true, isPrivate = false, noTransform = true)
public class Resource2 {

  @GET
  public String getBar() {
    ...
  }
}

*Assuming Resource2 is parsed first for CacheControlInterceptor *, when
reaching GET <host>/foo I get in the response headers:
Cache-Control → no-transform, proxy-revalidate, s-maxage=3600, max-age=3600

And when reaching GET <host>/bar I also get in the response headers:
Cache-Control → no-transform, proxy-revalidate, s-maxage=3600, max-age=3600
while expected: s-maxage=500, max-age=500



2. Why 304 responses are not being included in postProcess method? They are
also good ones when using ETag checks.
What should be the best way to enhance CacheControlInterceptor to also
include those 304 on postProcess? Just implementing a PostProcessInterceptor
and registring it as @Provider?


Thanks in advance for your help.


Gervasio

-- 


The information contained in this e-mail may be confidential. It has been 
sent for the sole use of the intended recipient(s). If the reader of this 
message is not an intended recipient, you are hereby notified that any 
unauthorized review, use, disclosure, dissemination, distribution or 
copying of this communication, or any of its contents, 
is strictly prohibited. If you have received it by mistake please let us 
know by e-mail immediately and delete it from your system. Many thanks.

 

La información contenida en este mensaje puede ser confidencial. Ha sido 
enviada para el uso exclusivo del destinatario(s) previsto. Si el lector de 
este mensaje no fuera el destinatario previsto, por el presente queda Ud. 
notificado que cualquier lectura, uso, publicación, diseminación, 
distribución o copiado de esta comunicación o su contenido está 
estrictamente prohibido. En caso de que Ud. hubiera recibido este mensaje 
por error le agradeceremos notificarnos por e-mail inmediatamente y 
eliminarlo de su sistema. Muchas gracias.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to