localcache

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheHandler

type CacheHandler interface {
	datastore.Middleware
	storagecache.Storage

	HasCache(key datastore.Key) bool
	DeleteCache(ctx context.Context, key datastore.Key)
	CacheKeys() []string
	CacheLen() int
	FlushLocalCache()
}

func New

func New(opts ...CacheOption) CacheHandler

type CacheOption added in v0.15.0

type CacheOption interface {
	Apply(*cacheHandler)
}

func WithExcludeKinds added in v0.15.0

func WithExcludeKinds(kinds ...string) CacheOption

func WithExpireDuration added in v0.15.0

func WithExpireDuration(d time.Duration) CacheOption

func WithIncludeKinds added in v0.15.0

func WithIncludeKinds(kinds ...string) CacheOption

func WithKeyFilter added in v0.15.0

func WithKeyFilter(f storagecache.KeyFilter) CacheOption

func WithLogger added in v0.15.0

func WithLogger(logf func(ctx context.Context, format string, args ...interface{})) CacheOption

Jump to

Keyboard shortcuts

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