[
https://issues.apache.org/jira/browse/SLING-12259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sumanta Pakira updated SLING-12259:
-----------------------------------
Description:
When the model cache is enabled, then the adapter cache map keeps on growing
which causes high memory consumtion
For example, In an application when adapting to a resource of type dam:Asset
then in this [line of
code|https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L351]
the Map keeps on growing.
One way to solve this problem would be to implement LRU based cache. Please let
me know what do you think, I can create PR accordingly.
was:
When the model cache is enabled, then the adapter cache map keeps on growing
which causes high memory consumtion
For example, In an application when adapting to a resource of type dam:Asset
then in this [line of
code|https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L351]
the Map keeps on growing.
One way to solve this problem would be to implement LRU based cache
> ModelFactory adatpercache does not cleanup entries
> --------------------------------------------------
>
> Key: SLING-12259
> URL: https://issues.apache.org/jira/browse/SLING-12259
> Project: Sling
> Issue Type: Bug
> Components: Sling Models
> Reporter: Sumanta Pakira
> Priority: Major
>
> When the model cache is enabled, then the adapter cache map keeps on growing
> which causes high memory consumtion
> For example, In an application when adapting to a resource of type dam:Asset
> then in this [line of
> code|https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java#L351]
> the Map keeps on growing.
> One way to solve this problem would be to implement LRU based cache. Please
> let me know what do you think, I can create PR accordingly.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)