Documentation ¶
Index ¶
- type CacheHandler
- type CacheOption
- func WithExcludeKinds(kinds ...string) CacheOption
- func WithExpireDuration(d time.Duration) CacheOption
- func WithIncludeKinds(kinds ...string) CacheOption
- func WithKeyFilter(f storagecache.KeyFilter) CacheOption
- func WithLogger(logf func(ctx context.Context, format string, args ...interface{})) CacheOption
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
Click to show internal directories.
Click to hide internal directories.