class RedisCache[K, V](name: String, pool: JedisPool, serializer: BinarySerializer, ktype: Class[K], vtype: Class[V], val ttl: Long) extends Cache[K, V]
- Companion:
- object
trait Cache[K, V]
class Object
trait Matchable
class Any
Value members
Concrete methods
Same with put,but return true when absent
Same with put,but return true when absent
- Definition Classes
- Cache
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
}
- Returns:
false if key not exists
- Definition Classes
- Cache