{"modulePath":"github.com/micro/services","version":"v1.6.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\nCache provides a simple marshaling layer on top of the store\n\n## Variables\n\n```go\nvar (\n\tDefaultCacheSize = 1000\n\n\tDefaultCache = New(nil)\n\n\tErrNotFound = errors.New(\"not found\")\n)\n```\n\n## Functions\n\n```go\nfunc Decrement(key string, val int64) (int64, error)\n```\n\n```go\nfunc Delete(key string) error\n```\n\n```go\nfunc Get(key string, val interface{}) (time.Time, error)\n```\n\n```go\nfunc Increment(key string, val int64) (int64, error)\n```\n\n```go\nfunc ListKeys() ([]string, error)\n```\n\n```go\nfunc Set(key string, val interface{}, expires time.Time) error\n```\n\n## Types\n\n```go\ntype Cache interface {\n\t// Context returns a tenant scoped Cache\n\tContext(ctx context.Context) Cache\n\tGet(key string, val interface{}) (time.Time, error)\n\tSet(key string, val interface{}, expires time.Time) error\n\tDelete(key string) error\n\tIncrement(key string, val int64) (int64, error)\n\tDecrement(key string, val int64) (int64, error)\n\tListKeys() ([]string, error)\n\tClose() error\n}\n```\n\n```go\nfunc Context(ctx context.Context) Cache\n```\n\n```go\nfunc New(st store.Store) Cache\n```\n\n","path":"github.com/micro/services/pkg/cache","name":"cache","synopsis":"Cache provides a simple marshaling layer on top of the store","isRedistributable":true}
