memcached

package
v0.0.0-...-4af24e4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package memcached is a cache implementation for onecache which uses memcached

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemcachedStore

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

func New

func New(opts ...Option) *MemcachedStore

func NewMemcachedStore

func NewMemcachedStore(c *memcache.Client, prefix string) *MemcachedStore

Deprecated -- Use New instead Returns a new instance of the memached store. If prefix is an empty string, it defaults to the package's prefix constant

func (*MemcachedStore) Delete

func (m *MemcachedStore) Delete(k string) error

func (*MemcachedStore) Flush

func (m *MemcachedStore) Flush() error

func (*MemcachedStore) Get

func (m *MemcachedStore) Get(k string) ([]byte, error)

func (*MemcachedStore) Has

func (m *MemcachedStore) Has(key string) bool

func (*MemcachedStore) Set

func (m *MemcachedStore) Set(k string, data []byte, expires time.Duration) error

type Option

type Option func(m *MemcachedStore)

Option defines a Memcached option

func Client

func Client(client *memcache.Client) Option

Client configures the store to make use of the passed client

Jump to

Keyboard shortcuts

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