commit | a2d85e0ca5d6c80fb9506c0dbe5aebd3b17a7cc4 | [log] [tgz] |
---|---|---|
author | Jörg Hoh <joerghoh@users.noreply.github.com> | Wed Aug 02 19:18:16 2023 +0200 |
committer | GitHub <noreply@github.com> | Wed Aug 02 19:18:16 2023 +0200 |
tree | acf74902ac0ea13560286c23b123d668f21fec1c | |
parent | e015d4879d176199b3f0c533af148e658fd77f1f [diff] |
SLING11982 avoid repo access (#40) Avoid repository access by caching already resolved resources in the ScriptResolver's propertyMap. As the ResourceResolver used here (the ScriptResolver) is private to this bundle (either stored as a ThreadLocal to a request or as the sharedResolver) and is not exposed to an external party, its lifecycle is controlled: * Either the ResourceResolver is created fresh for every request (and closed when the request is finished) * or it lives along with the sharedResolver. So in the first case (request) we don't need to care about clearing any caches. For the 2nd case there is an explicit cache invalidation, when the sharedResolver is re-acquired. This feature is enabled by default, and can be turned off via OSGI (the property "enable.resource.caching" on PID "org.apache.sling.servlets.resolver.internal.SlingScriptResolverImpl").
This module is part of the Apache Sling project.
Bundle implementing the Sling API ServletResolver. See the servlets and scripts documentation for how this works.