gocache

package
v0.0.0-...-2e7882b Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package gocache is a wrapper for Patrick Mylund Nielsen's go-cache package fouund at github.com/patricknm/go-cache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache is the struct which implememnts the cache.Cache interface.

func New

func New(defaultExpiration, cleanupInterval time.Duration) *Cache

New returns a new go-cache struct

func (*Cache) Cache

func (c *Cache) Cache() *gc.Cache

Cache returns the underlying go-cache struct so you can use it's more powerful feature-set.

func (*Cache) Del

func (c *Cache) Del(key string) error

Del implements the cache.Cache deletion interface

func (*Cache) Exists

func (c *Cache) Exists(key string) bool

Exists implements the cache.Cache exists interface

func (*Cache) Get

func (c *Cache) Get(key string, dstVal interface{}) error

Get implements the cache.Cache getter interface

func (*Cache) Set

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

Set implements the cache.Cache setter interface

Jump to

Keyboard shortcuts

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