-
- All Implemented Interfaces:
public interface CacheServiceRepresents a component that facilitates caching.
-
-
Method Summary
Modifier and Type Method Description abstract booleanset(@NonNull() String cacheName, @NonNull() String key, @NonNull() CacheEntry value)Creates or updates the key-value pair in the cache. abstract CacheResultget(@NonNull() String cacheName, @NonNull() String key)Retrieves the item associated with the key from the cache. abstract booleanremove(@NonNull() String cacheName, @NonNull() String key)Removes the item associated with the key from the cache. -
-
Method Detail
-
set
abstract boolean set(@NonNull() String cacheName, @NonNull() String key, @NonNull() CacheEntry value)
Creates or updates the key-value pair in the cache.
- Parameters:
cacheName- name of the cache where the cache entry is to be createdkey- key for the item to be cachedvalue- the value that is to be associated withkey
-
get
@Nullable() abstract CacheResult get(@NonNull() String cacheName, @NonNull() String key)
Retrieves the item associated with the key from the cache.
- Parameters:
cacheName- name of the cache where the key should be queried fromkey- key for the cache entry
-
-
-
-