Joerg Hoh created SLING-12791:
---------------------------------

             Summary: Cache resolved scripts in ScriptDependencyResolver
                 Key: SLING-12791
                 URL: https://issues.apache.org/jira/browse/SLING-12791
             Project: Sling
          Issue Type: Task
          Components: HTL
    Affects Versions: Scripting HTL Engine 1.4.28-1.4.0
            Reporter: Joerg Hoh



The global resolutionCache in the ScriptDependencyResolver can cache the 
resolved script paths (as String) to save repository access. But afterwards 
this path always needs to be resolved to a script resource using the 
{{perRequestScopedResourceResolver}}.

As the runtime of this ResourceResolver is scoped to the request as well, it is 
safe to cache already resolved paths and re-use them if the same path needs to 
be resolved.

See 
https://github.com/apache/sling-org-apache-sling-scripting-sightly/blob/830368475ba100e3bde18be49a73f79b1b927c14/src/main/java/org/apache/sling/scripting/sightly/impl/utils/ScriptDependencyResolver.java#L136-L138




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to