Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9781

[Sling Models] Caching doesn't work with Wrapped requests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Models Impl 1.4.12
    • Models Impl 1.4.14
    • Extensions
    • None

    Description

      The caching of Sling models doesn't work when the original SlingHttpServletRequest is wrapped in a request wrapper, like this is typically done in HTL scripts with the OnDemandReaderRequest wrapper.

      The solution is to use the original request when caching models so that any wrapping does not interfere with the caching. When someone enables caching for a model adapted from request, I think the expectation is that caching does happen whenever the original request is wrapped.

      I'll provide a PR with a fix.

      cc: justinedelson radu as discussed in Slack.

      Attachments

        Issue Links

          Activity

            People

              justinedelson Justin Edelson
              jelger Christophe Jelger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m