cache

package
v0.0.0-...-8acfb8e Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialization

func Deserialization(byt []byte, ptr interface{}) (err error)

func Serialization

func Serialization(value interface{}) ([]byte, error)

Types

type Cache

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

func (Cache) Delete

func (c Cache) Delete(keys ...interface{}) (bool, error)

func (Cache) Exist

func (c Cache) Exist(key string) (bool, error)

func (Cache) Expire

func (c Cache) Expire(key string, lifeTime int64) error

func (Cache) Get

func (c Cache) Get(key string, v interface{}) error

func (Cache) Incr

func (c Cache) Incr(key string) (int, error)

func (Cache) Set

func (c Cache) Set(key string, v interface{}, expire int64) error

type CacheIFace

type CacheIFace interface {
	Set(key string, v interface{}, expire int64) error
	Get(name string, v interface{}) error
	Exist(name string) (bool, error)
	Incr(name string) (int, error)
	Expire(name string, newSecondsLifeTime int64) error
	Delete(keys ...interface{}) (bool, error)
}

func NewCache

func NewCache(conn redis.Conn) CacheIFace

Jump to

Keyboard shortcuts

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