[
https://issues.apache.org/jira/browse/SLING-6635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906664#comment-15906664
]
Oliver Lietz commented on SLING-6635:
-------------------------------------
Besides LRU we should look at TinyLFU. See:
* [TinyLFU: A Highly Efficient Cache Admission
Policy|http://www.cs.technion.ac.il/~gilga/TinyLFU_PDP2014.pdf] (Update:
https://arxiv.org/pdf/1512.00727.pdf)
* https://github.com/ben-manes/caffeine/wiki/Efficiency
* SOLR-8241
* 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)