Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrExpired = errors.New("expired") )
Functions ¶
func Register ¶
func Register(name string, driver CacheDriver)
Types ¶
type Cache ¶
type Cache interface {
Has(ctx context.Context, key string) (bool, error)
Get(ctx context.Context, key string) ([]byte, error)
Put(ctx context.Context, key string, data []byte) error
PutTemp(ctx context.Context, key string, data []byte, lifetime time.Duration) error
Delete(ctx context.Context, key string) error
Flush(ctx context.Context) error
Run(ctx context.Context, name string, args ...[]byte) error
}
Click to show internal directories.
Click to hide internal directories.