memcache

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...CacheOptions) cache.Cache

New creates new memcache adapter.

Types

type Cache

type Cache struct {
	Memcache *memcache.Client
}

func (*Cache) Clear

func (m *Cache) Clear() error

func (*Cache) Decrement

func (m *Cache) Decrement(key string, step int) error

func (*Cache) Delete

func (m *Cache) Delete(key string) error

func (*Cache) Get

func (m *Cache) Get(key string) (any, error)

func (*Cache) GetMulti

func (m *Cache) GetMulti(keys []string) ([]any, error)

func (*Cache) Has

func (m *Cache) Has(key string) (bool, error)

func (*Cache) Increment

func (m *Cache) Increment(key string, step int) error

func (*Cache) Name

func (m *Cache) Name() string

func (*Cache) Set

func (m *Cache) Set(key string, value any, ttl time.Duration) error

type CacheOptions

type CacheOptions func(c *Cache)

func CacheWithMemcacheClient

func CacheWithMemcacheClient(memcache *memcache.Client) CacheOptions

Jump to

Keyboard shortcuts

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