Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-382

Server cache should look for generated ETag in response

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 2.0-beta-3
    • 1.2.1.GA, 2.0-beta-2
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            patriot1burke@gmail.com Bill Burke (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: