You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2020/10/19 10:31:00 UTC
[jira] [Closed] (SLING-9781) [Sling Models] Caching doesn't work
with Wrapped requests
[ https://issues.apache.org/jira/browse/SLING-9781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Radu Cotescu closed SLING-9781.
-------------------------------
> [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: 2h 10m
> 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)