-
Bug
-
Resolution: Won't Do
-
Major
-
1.2.1.GA, 2.0-beta-2
-
None
-
None
Hi all, alex@ignacioalex.com
RESTEasy's users manual says that the server will cache every response
that has the Cache-Control header set by the resource method, and will
generate an ETag value based on the MD5 hash of the body content. Why
doesn't it simply reuse the ETag value set by the resource method (if
there is one)?
Won't this generated ETag value interfere with the regular cache
revalidation mechanism? Consider the scenario of a client revalidating
her cache with the If-None-Match header and the server cache has
expired: the server will execute the resource method again that will
check the ETag with the Request.evaluatePreconditions API, but the ETag
will not match even if the resource hasn't changed, because the ETag
given to the client was generated by RESTEasy using a different
mechanism. This would cause an unnecessary work for retrieving the
resource and marshalling it in order to get it to the server cache again.
Thanks,
Alex