Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Models Impl 1.4.12
-
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
- causes
-
SLING-9834 [Sling Models] Caching bug with reused Servlet requests
- Closed
- links to