Class CachingMap<T>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,SoftReference<T>>
org.apache.sling.scripting.core.impl.helper.CachingMap<T>
Type Parameters:
T - the type to which SoftReferences will be kept
All Implemented Interfaces:
Serializable, Cloneable, Map<String,SoftReference<T>>

public class CachingMap<T> extends LinkedHashMap<String,SoftReference<T>>

The CachingMap class offers an implementation of a LinkedHashMap that can be used for caches. The maps' values are SoftReferences, such that garbage collection can be performed on the cache, if needed.

Read / write operations are NOT synchronised.

See Also: