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

@Cache annotation ignored when not set on the implementation itself

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.2.7.Final, 7.0.0.Alpha1
    • 3.15.3.Final, 4.7.5.Final, 6.0.0.Final
    • None
    • None

    Description

      When the @Cache annotation is set on an interface, in as sub-resource, the annotation is not detected by the CacheControlFeature, and as a consequence, no cache-control header is set on the GET request.

      This issue stems from the change in the behavior of ResourceInfo, brought by https://issues.redhat.com/browse/RESTEASY-2391

      Indeed, the CacheControlFeature was relying on the resourceInfo.getMethod() to hold the annotation, which is no more the case, because this now returns the implementation method, which is not necessarily the annotated one.

      This issue not only affects CacheControlFeature but also any dynamic feature which relied on the previous behavior of resourceInfo.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-rbudinsk Rastislav Budinský
              rgaschy Régis Gaschy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: