Map-based implementation of
. The map backing the
cache of contexts is synchronized and its entries are soft-referenced, so may
be garbage collected under pressure.
Default value for maximum capacity of the cache. This is set to a
reasonably low value (4096) to avoid users inadvertently filling the
cache with item keys that are inconsistent.
Public setter for the capacity. Prevents the cache from growing
unboundedly if items that fail are misidentified and two references to an
identical item actually do not have the same key. This can happen when
users implement equals and hashCode based on mutable fields, for
capacity the capacity to set
+ "Do you need to re-consider the implementation of the key generator, "
+ "or the equals and hashCode of the items that failed?");