Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (21 sloc) 568 Bytes
package cachego
import (
type (
// Cache is the top-level cache interface
Cache interface {
// Contains check if a cached key exists
Contains(key string) bool
// Delete remove the cached key
Delete(key string) error
// Fetch retrieve the cached key value
Fetch(key string) (string, error)
// FetchMulti retrieve multiple cached keys value
FetchMulti(keys []string) map[string]string
// Flush remove all cached keys
Flush() error
// Save cache a value by key
Save(key string, value string, lifeTime time.Duration) error
You can’t perform that action at this time.