memcached

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 6 Imported by: 0

README

UNTESTED DRIVER

Work In Progress

It uses memcache driver.

Feel free to tinker with to make it work. Then submit a Pull Request.

Documentation

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
}

MemcachedStore is used to create a memcached-backed cache.

func NewMemachedStoreFromSelector

func NewMemachedStoreFromSelector(ss memcache.ServerSelector) *MemcachedStore

NewMemachedStoreFromSelector creates a memcached-backed cache.

func NewMemcachedStore

func NewMemcachedStore(server ...string) *MemcachedStore

NewMemcachedStore creates a memcached-backed cache.

func (*MemcachedStore) Close

func (c *MemcachedStore) Close()

Close returns the connection back to the pool for storage drivers that utilize a pool.

func (*MemcachedStore) Conn

func (c *MemcachedStore) Conn(ctx context.Context) (remember.Cacher, error)

Conn does nothing for this storage driver.

func (*MemcachedStore) Forget

func (c *MemcachedStore) Forget(key string) error

Forget clears the value from the cache for the particular key.

func (*MemcachedStore) ForgetAll

func (c *MemcachedStore) ForgetAll() error

ForgetAll clears all values from the cache.

func (*MemcachedStore) Get

func (c *MemcachedStore) Get(key string) (_ interface{}, found bool, _ error)

Get retrieves a value from the cache. The key must be at most 250 bytes in length.

func (*MemcachedStore) Set

func (c *MemcachedStore) Set(key string, expiration time.Duration, itemToStore interface{}) error

Set stores a value in the cache. The key must be at most 250 bytes in length.

func (*MemcachedStore) StorePointer

func (c *MemcachedStore) StorePointer() bool

StorePointer sets whether a storage driver requires itemToStore to be stored as a pointer or as a concrete value.

Jump to

Keyboard shortcuts

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