[ https://issues.apache.org/jira/browse/SLING-9781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson resolved SLING-9781. ----------------------------------- Resolution: Fixed Fixed with 73cae5875cc47c76991d0a58e4fb2351595eb146 > [Sling Models] Caching doesn't work with Wrapped requests > --------------------------------------------------------- > > Key: SLING-9781 > URL: https://issues.apache.org/jira/browse/SLING-9781 > Project: Sling > Issue Type: Bug > Components: Extensions > Affects Versions: Sling Models Impl 1.4.12 > Reporter: Christophe Jelger > Assignee: Justin Edelson > Priority: Major > Fix For: Sling Models Impl 1.4.14 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > 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. -- This message was sent by Atlassian Jira (v8.3.4#803005)