caching

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// Get an item from the cache. Returns the item or nil, and a bool indicating whether the key was found
	Get(key string) (interface{}, bool)

	// Add an item to the cache, replacing any existing item, using the default expiration
	Set(key string, value interface{})
}

Cache represents a simple data cache

func NewCache

func NewCache(config config.CacheConfig) *Cache

NewCache creates a new caching.Cache

Jump to

Keyboard shortcuts

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