cache

package
v0.0.40-alpha4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func NewMemory

func NewMemory(defaultExpiration, cleanupInterval time.Duration) *Memory

func (*Memory) Delete

func (m *Memory) Delete(key string)

func (*Memory) Get

func (m *Memory) Get(key string) (interface{}, bool)

func (*Memory) Set

func (m *Memory) Set(key string, val interface{}, d time.Duration)

type Redis

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

func NewRedis

func NewRedis(option *redis.Options) (*Redis, error)

func (*Redis) Clear

func (r *Redis) Clear() error

func (*Redis) Delete

func (r *Redis) Delete(key string) error

func (*Redis) Get

func (r *Redis) Get(key string) (interface{}, bool, error)

func (*Redis) Set

func (r *Redis) Set(key string, val interface{}, d time.Duration) error

Jump to

Keyboard shortcuts

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