Package io.ocfl.core.cache
Class NoOpCache<K,V>
java.lang.Object
io.ocfl.core.cache.NoOpCache<K,V>
- All Implemented Interfaces:
Cache<K,
V>
Pass-through cache implementation that never caches.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the cache contains the specified keyRetrieves a value from the cache.void
invalidate
(K key) Invalidates the key in the cache.void
Invalidates the entire cachevoid
Inserts a value into the cache.
-
Constructor Details
-
NoOpCache
public NoOpCache()
-
-
Method Details
-
get
Description copied from interface:Cache
Retrieves a value from the cache. If it doesn't exist, the loader is called to load the object, which is then cached and returned. -
put
Description copied from interface:Cache
Inserts a value into the cache. -
invalidate
Description copied from interface:Cache
Invalidates the key in the cache.- Specified by:
invalidate
in interfaceCache<K,
V> - Parameters:
key
- key
-
invalidateAll
public void invalidateAll()Description copied from interface:Cache
Invalidates the entire cache- Specified by:
invalidateAll
in interfaceCache<K,
V>
-
contains
Description copied from interface:Cache
Returns true if the cache contains the specified key
-