Common interface of Cache
3.2.0
Remove all mappings from the cache.
Evict specified key
Exists key
Get Some(T) or None
Put a new Value
Same with put,but return true when absent
return Some(v) when exists old value
return true is (k,oldvalue) exists
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 }
false if key not exists
Time to idle seconds,-1 is forever
Time to live seconds,-1 is forever