[
https://issues.apache.org/jira/browse/SLING-6635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906959#comment-15906959
]
Carsten Ziegeler commented on SLING-6635:
-----------------------------------------
Not sure if this is really an improvement. If users are heavily using
selectors, the cache will change constantly.
I rather think that the current way the caching is done could be improved by
keeping a cached info about available scripts in an efficient way, providing a
cache that caches the resolution completely and is independent of whether users
are using selectors for transporting parameters etc.
> Implement LRU Cache for SlingServletResolver
> --------------------------------------------
>
> Key: SLING-6635
> URL: https://issues.apache.org/jira/browse/SLING-6635
> Project: Sling
> Issue Type: Improvement
> Components: Servlets
> Affects Versions: Servlets Resolver 2.4.10
> Reporter: Jörg Hoh
>
> During the servlet resolution all results are stored for later reuse in a
> ConcurrentHashMap. In parallel the maximum cache size is configured and
> always controlled.
> If this max cachesize is reached, no more results are stored in the hashmap;
> if the load pattern has changed, this could result in a case, that many/all
> servlet resolutions are no longer stored in cache.
> It would be good, if the cache employs a LRU strategy to keep often resolved
> AbstractResourceCollectors in cache and avoid the penalty of cache misses.
> Limiting the cache size would still be useful and required.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)