You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/10/02 07:14:51 UTC

[GitHub] [sling-org-apache-sling-models-impl] cjelger edited a comment on pull request #20: SLING-9781 - [Sling Models] Caching doesn't work with Wrapped requests

cjelger edited a comment on pull request #20:
URL: https://github.com/apache/sling-org-apache-sling-models-impl/pull/20#issuecomment-702568534


   > I at least could not say whether it would be expected that for a wrapped resource if the cache should be keyed on the wrapper or the base.
   
   I agree with @justinedelson, in the case of a wrapped resource it's not obvious what the expected caching behaviour should be, I also honestly cannot think of a "standard" use case that would involve wrapped resources and would clearly demonstrate that the cache key should always be the "base" resource.
   
   In contrast and IMO, the issue with wrapped requests is straightforward: it is the consequence of the wrapping done by the scripting engine, and pretty much prevents caching from being used in an advanced scenario where multiple scripts are involved. I also don't see why anyone would expect the caching to be based on wrapped requests that are being added "behind the scene" without any control/visibility on what happens ... in this case and IMHO, it's clear that we want to use the base request for the cache key.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org