RedisCache

class RedisCache[F[_], K, V](val jedisPool: JedisPool)(implicit evidence$1: Sync[F], val keyEncoder: BinaryEncoder[K], val codec: BinaryCodec[V]) extends RedisCacheBase[F, K, V]

Thin wrapper around Jedis

Companion
object
trait RedisCacheBase[F, K, V]
trait AbstractCache[F, K, V]
trait LoggingSupport[F, K]
trait Cache[F, K, V]
class Object
trait Matchable
class Any

Type members

Types

type JClient = Jedis

Value members

Inherited methods

final override
def caching(key: K)(ttl: Option[Duration])(f: => V)(implicit flags: Flags): F[V]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
override
def cachingF(key: K)(ttl: Option[Duration])(f: F[V])(implicit flags: Flags): F[V]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
protected
def doGet(key: K): F[Option[V]]
Inherited from
RedisCacheBase
protected
def doPut(key: K, value: V, ttl: Option[Duration]): F[Unit]
Inherited from
RedisCacheBase
protected
def doRemove(key: K): F[Unit]
Inherited from
RedisCacheBase
final override
def get(key: K)(implicit flags: Flags): F[Option[V]]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
protected
def logCacheHitOrMiss[A](key: K, result: Option[A]): F[Unit]

Output a debug log to record the result of a cache lookup

Output a debug log to record the result of a cache lookup

Type Params
A

the type of the cache value

Value Params
key

the key that was looked up

result

the result of the cache lookup

Inherited from
LoggingSupport
protected
def logCachePut(key: K, ttl: Option[Duration]): F[Unit]

Output a debug log to record a cache insertion/update

Output a debug log to record a cache insertion/update

Value Params
key

the key that was inserted/updated

ttl

the TTL of the inserted entry

Inherited from
LoggingSupport
final override
def put(key: K)(value: V, ttl: Option[Duration])(implicit flags: Flags): F[Unit]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
final override
def remove(key: K): F[Unit]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
final override
def removeAll: F[Unit]
Definition Classes
AbstractCache -> Cache
Inherited from
AbstractCache
final protected
def withJedis[T](f: JClient => F[T]): F[T]

Borrow a Jedis client from the pool, perform some operation and then return the client to the pool.

Borrow a Jedis client from the pool, perform some operation and then return the client to the pool.

Type Params
T

return type of the block

Value Params
f

block that uses the Jedis client.

Returns

the result of executing the block

Inherited from
RedisCacheBase

Concrete fields

val jedisPool: JedisPool

Inherited fields

val close: F[Unit]
Inherited from
RedisCacheBase
final override protected
val logger: Logger[F]
Inherited from
RedisCacheBase

Implicits

Implicits

implicit
val codec: BinaryCodec[V]
implicit
val keyEncoder: BinaryEncoder[K]