Cache
org.beangle.cache.Cache
Common interface of Cache
Attributes
- Since:
3.2.0
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
Members list
Concise view
Value members
Abstract methods
Remove all mappings from the cache.
Remove all mappings from the cache.
Attributes
Evict specified key
Evict specified key
Attributes
Exists key
Exists key
Attributes
Get Some(T) or None
Get Some(T) or None
Attributes
Put a new Value
Put a new Value
Attributes
Same with put,but return true when absent
Same with put,but return true when absent
Attributes
return Some(v) when exists old value
return Some(v) when exists old value
Attributes
return true is (k,oldvalue) exists
return true is (k,oldvalue) exists
Attributes
Touch the key,restart ttl The default implementation is equivalent to
Touch the key,restart ttl The default implementation is equivalent to
val v = cache.get(k)
if(v.isEmpty) false
else {
cache.remove(k)
cache.put(k,v.get)
true
}
Attributes
- Returns:
false if key not exists
Time to idle seconds,-1 is forever
Time to idle seconds,-1 is forever
Attributes
Time to live seconds,-1 is forever
Time to live seconds,-1 is forever