freemarker.cache
public class StrongCacheStorage extends Object implements ConcurrentCacheStorage
Map
.
It holds a strong reference to all objects it was passed, therefore prevents
the cache from being purged during garbage collection.
This class is thread-safe to the extent that its underlying map is. The
default implementation uses a concurrent map on Java 5 and above, so it is
thread-safe in that case.Configuration.setCacheStorage(CacheStorage)
Constructor and Description |
---|
StrongCacheStorage() |
public boolean isConcurrent()
ConcurrentMap
.isConcurrent
in interface ConcurrentCacheStorage
public Object get(Object key)
get
in interface CacheStorage
public void put(Object key, Object value)
put
in interface CacheStorage
public void remove(Object key)
remove
in interface CacheStorage
public void clear()
clear
in interface CacheStorage