cache

package
v0.0.0-...-a1cd0b2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 5 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 struct {
	// contains filtered or unexported fields
}

Cache struct

func New

func New(storageDir string) *Cache

New returns an initialized Cache instance

func (*Cache) Get

func (c *Cache) Get(key string) ([]byte, error)

Get fetches a byte slice from cache

func (*Cache) Save

func (c *Cache) Save(key string, data []byte, ttl int64) error

Save saves a byte slice to cache

Jump to

Keyboard shortcuts

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