com.ctc.wstx.util
public final class SimpleCache extends java.lang.Object
For JDK 1.4 and up, will use LinkedHashMap
in LRU mode,
so expiration does happen using typical LRU algorithm. For 1.3 and
below will just discard an entry in random.
Note: we probably should use weak references, or something similar to limit maximum memory usage. This could be implemented in many ways, perhaps by using two areas: first, smaller one, with strong refs, and secondary bigger one that uses soft references.
Constructor and Description |
---|
SimpleCache(int maxSize) |