Documentation ¶
Index ¶
- type MemcachedStore
- func (c *MemcachedStore) Close()
- func (c *MemcachedStore) Conn(ctx context.Context) (remember.Cacher, error)
- func (c *MemcachedStore) Forget(key string) error
- func (c *MemcachedStore) ForgetAll() error
- func (c *MemcachedStore) Get(key string) (_ interface{}, found bool, _ error)
- func (c *MemcachedStore) Set(key string, expiration time.Duration, itemToStore interface{}) error
- func (c *MemcachedStore) StorePointer() bool
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.