memcached

package
v0.0.0-...-0c66be6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = cacheerrors.ErrNotFound

Functions

func NewProvider

func NewProvider(maxIdleConns int, timeout time.Duration, memcacheUrl ...string) func() (interfaces.CacheImpl, error)

Types

type Cache

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

func New

func New(maxIdleConns int, timeout time.Duration, memcacheUrl ...string) (*Cache, error)

func (*Cache) Close

func (this *Cache) Close() (err error)

func (*Cache) Get

func (this *Cache) Get(key string) (value interface{}, resultType interfaces.ResultType, err error)

func (*Cache) GetWithExpiration

func (this *Cache) GetWithExpiration(key string) (value interface{}, resultType interfaces.ResultType, exp time.Duration, err error)

func (*Cache) Remove

func (this *Cache) Remove(key string) error

func (*Cache) Reset

func (this *Cache) Reset() error

func (*Cache) Set

func (this *Cache) Set(key string, value interface{}, exp time.Duration) (err error)

type Wrapper

type Wrapper struct {
	ExpUnixDate int64       `json:"e"`
	Value       interface{} `json:"v"` //deprecated
	Json        string      `json:"j"`
}

Jump to

Keyboard shortcuts

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