| Constructor and Description |
|---|
DefaultCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the entire cache.
|
void |
delete(java.lang.String key)
Delete the value from the cache.
|
java.lang.Boolean |
get(java.lang.String key)
Get the value from the cache, handling expiration.
|
void |
set(java.lang.String key,
boolean value)
Set the cache value without a TTL.
|
void |
set(java.lang.String key,
boolean value,
java.time.Duration ttl)
Set the cache value with an optional time-to-live (TTL).
|
boolean |
set(java.lang.String key,
boolean value,
java.lang.Object... extra)
Set puts key and value into cache.
|
public void set(java.lang.String key,
boolean value,
java.time.Duration ttl)
key - The cache key to store the value.value - The boolean value to be stored in the cache.ttl - The time-to-live for the cache item; if null or negative, the item will not expire.public void set(java.lang.String key,
boolean value)
key - The cache key to store the value.value - The boolean value to be stored in the cache.public boolean set(java.lang.String key,
boolean value,
java.lang.Object... extra)
public java.lang.Boolean get(java.lang.String key)
get in interface Cachekey - The cache key to retrieve the value.CasbinCacheException - If the key does not exist in the cache.public void delete(java.lang.String key)
throws CasbinCacheException
delete in interface Cachekey - The cache key to delete the value.CasbinCacheExceptionCopyright © 2017–2025. All rights reserved.