Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(ctx context.Context, key string) ([]byte, error)
Set(ctx context.Context, key string, value []byte, ttl time.Duration) error
Delete(ctx context.Context, key string) error
Has(ctx context.Context, key string) (bool, error)
}
Cache 是进程级缓存契约(L0)。实现可在 L1 内存或 L2 Redis。
Source Files
¶
- cache.go
Click to show internal directories.
Click to hide internal directories.