redis

package
v0.0.0-...-12c9185 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheService

type CacheService struct {
	// contains filtered or unexported fields
}

CacheService implements chronicle.CacheService interface using redis

func NewCacheService

func NewCacheService(redisClient *redis.Client) *CacheService

NewCacheService construct a new CacheService from redis client

func (CacheService) Get

func (c CacheService) Get(key string) (result []byte, err error)

Get a cache in bytes from a key

func (CacheService) Set

func (c CacheService) Set(key string, value []byte) (err error)

Set cache in bytes with key without expiration

func (CacheService) SetEx

func (c CacheService) SetEx(key string, value []byte, expiration time.Duration) (err error)

SetEx cache in bytes with key with expiration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL