Package freemarker.cache
Class NullCacheStorage
- java.lang.Object
-
- freemarker.cache.NullCacheStorage
-
- All Implemented Interfaces:
CacheStorage,CacheStorageWithGetSize,ConcurrentCacheStorage
public class NullCacheStorage extends java.lang.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 Summary
Fields Modifier and Type Field Description static NullCacheStorageINSTANCE
-
Constructor Summary
Constructors Constructor Description NullCacheStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()java.lang.Objectget(java.lang.Object key)intgetSize()Always returns 0.booleanisConcurrent()Returns true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.voidput(java.lang.Object key, java.lang.Object value)voidremove(java.lang.Object key)
-
-
-
Field Detail
-
INSTANCE
public static final NullCacheStorage INSTANCE
- Since:
- 2.3.22
-
-
Method Detail
-
isConcurrent
public boolean isConcurrent()
Description copied from interface:ConcurrentCacheStorageReturns true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.- Specified by:
isConcurrentin interfaceConcurrentCacheStorage- Returns:
- true if this instance of cache storage is concurrently accessible from multiple threads without synchronization.
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
getin interfaceCacheStorage
-
put
public void put(java.lang.Object key, java.lang.Object value)- Specified by:
putin interfaceCacheStorage
-
remove
public void remove(java.lang.Object key)
- Specified by:
removein interfaceCacheStorage
-
clear
public void clear()
- Specified by:
clearin interfaceCacheStorage
-
getSize
public int getSize()
Always returns 0.- Specified by:
getSizein interfaceCacheStorageWithGetSize- Since:
- 2.3.21
-
-