[
http://opensource.atlassian.com/projects/hibernate/browse/HV-479?page=com...
]
Hardy Ferentschik commented on HV-479:
--------------------------------------
Another option is
[
SoftLimitMRUCache|https://github.com/hibernate/hibernate-search/blob/mast...]
which is used in Hibernate Core and Search. I don't think this class is thread-safe
yet, but it might be a good starting point.
Adding some more sophisticated caching allows us to give the user some control over the
size of the cache. That might be a good idea.
Implement an eviction strategy for BeanMetaDataCache
----------------------------------------------------
Key: HV-479
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-479
Project: Hibernate Validator
Issue Type: Improvement
Components: engine
Reporter: Gunnar Morling
Fix For: 4.3.0.next
In {{BeanMetaDataCache}} we have a map from {{Class}} to {{BeanMetaDataImpl}}. Currently
there is no eviction strategy for this cache meaning entries will never be removed once
they were added to the cache and the {{ValidatorFactoryImpl}} holding the cache exists.
In particular this means that the concerned class objects never can be garbage-collected.
This might cause problems in long-running applications (especially as there is typically
one long-living {{ValidatorFactory}} instance per application). Maybe {{WeakHashMap}} or
similar might be useful here.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira