Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONMarshaller ¶
type JSONMarshaller struct{}
func (JSONMarshaller) MarshalRedis ¶
func (JSONMarshaller) MarshalRedis(a any) (string, error)
func (JSONMarshaller) UnmarshalRedis ¶
func (JSONMarshaller) UnmarshalRedis(s string) (any, error)
type KeyAdapter ¶
type Marshaller ¶
type RedisLoader ¶
type RedisLoader struct { redis.UniversalClient Marshaller loadingcache.Loader KeyAdapter Expiration time.Duration }
func New ¶
func New(client redis.UniversalClient, exp time.Duration) *RedisLoader
func (*RedisLoader) Load ¶
func (r *RedisLoader) Load(key any, cache loadingcache.Cache) (any, error)
func (*RedisLoader) WithKeyAdapter ¶
func (r *RedisLoader) WithKeyAdapter(keyAdapter KeyAdapter) *RedisLoader
func (*RedisLoader) WithLoader ¶
func (r *RedisLoader) WithLoader(loader loadingcache.Loader) *RedisLoader
func (*RedisLoader) WithMarshaller ¶
func (r *RedisLoader) WithMarshaller(marshaller Marshaller) *RedisLoader
Click to show internal directories.
Click to hide internal directories.