Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(s Storage, opts ...CacheOption) datastore.CacheStrategy
Types ¶
type CacheOption ¶ added in v0.8.0
type CacheOption interface {
Apply(*cacheHandler)
}
func WithExcludeKinds ¶ added in v0.8.0
func WithExcludeKinds(kinds ...string) CacheOption
func WithIncludeKinds ¶ added in v0.8.0
func WithIncludeKinds(kinds ...string) CacheOption
func WithKeyFilter ¶ added in v0.8.0
func WithKeyFilter(f func(key datastore.Key) bool) CacheOption
type Storage ¶
type Storage interface { SetMulti(ctx context.Context, is []*CacheItem) error // GetMulti returns slice of CacheItem of the same length as Keys of the argument. // If not in the cache, the value of the corresponding element is nil. GetMulti(ctx context.Context, keys []datastore.Key) ([]*CacheItem, error) DeleteMulti(ctx context.Context, keys []datastore.Key) error }
type TxOpLog ¶
type TxOpLog struct { Ops TxOps Key datastore.Key PendingKey datastore.PendingKey PropertyList datastore.PropertyList }
Click to show internal directories.
Click to hide internal directories.