| Constructor and Description |
|---|
DefaultCache() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(String id,
Function<? super String,T> mappingFunction)
Returns the value associated with the given id.
|
<T> T |
getIfPresent(String id)
Returns the value associated with the given id if it exists in the cache.
|
void |
invalidate(String id)
Invalidates the cache entry mapped to given id.
|
void |
invalidateAll()
Invalidates all cache entries.
|
void |
put(String id,
Object value)
Adds or replaces a value in the cache.
|
public void put(String id, Object value)
Cachepublic <T> T get(String id, Function<? super String,T> mappingFunction)
Cachepublic <T> T getIfPresent(String id)
Cachenull is returned.getIfPresent in interface CacheT - the type of object to return from the cacheid - The object idpublic void invalidate(String id)
Cacheinvalidate in interface Cachepublic void invalidateAll()
CacheinvalidateAll in interface CacheCopyright © 2019 Flux Capacitor. All rights reserved.