Package freemarker.cache
Class NullCacheStorage
java.lang.Object
freemarker.cache.NullCacheStorage
- All Implemented Interfaces:
CacheStorage
,CacheStorageWithGetSize
,ConcurrentCacheStorage
public class NullCacheStorage
extends Object
implements ConcurrentCacheStorage, CacheStorageWithGetSize
A cache storage that doesn't store anything. Use this if you
don't want caching.
- Since:
- 2.3.17
- See Also:
Configuration.setCacheStorage(CacheStorage)
-
Field Details
-
INSTANCE
- Since:
- 2.3.22
-
-
Constructor Details
-
NullCacheStorage
public NullCacheStorage()
-
-
Method Details
-
isConcurrent
public boolean isConcurrent()Description copied from interface:ConcurrentCacheStorage
Returns true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.- Specified by:
isConcurrent
in interfaceConcurrentCacheStorage
- Returns:
- true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.
-
get
- Specified by:
get
in interfaceCacheStorage
-
put
- Specified by:
put
in interfaceCacheStorage
-
remove
- Specified by:
remove
in interfaceCacheStorage
-
clear
public void clear()- Specified by:
clear
in interfaceCacheStorage
-
getSize
public int getSize()Always returns 0.- Specified by:
getSize
in interfaceCacheStorageWithGetSize
- Since:
- 2.3.21
-