Documentation
¶
Index ¶
- type Memory
- func (m *Memory) Delete(_ context.Context, key string) error
- func (m *Memory) Exists(_ context.Context, key string) (bool, error)
- func (m *Memory) Get(_ context.Context, key string) ([]byte, error)
- func (m *Memory) Incr(_ context.Context, key string) (int64, error)
- func (m *Memory) ScanDeleteByPrefix(_ context.Context, prefix string) error
- func (m *Memory) Set(_ context.Context, key string, val []byte, ttl time.Duration) error
- type Redis
- func (r *Redis) Delete(ctx context.Context, key string) error
- func (r *Redis) Exists(ctx context.Context, key string) (bool, error)
- func (r *Redis) Get(ctx context.Context, key string) ([]byte, error)
- func (r *Redis) Incr(ctx context.Context, key string) (int64, error)
- func (r *Redis) ScanDeleteByPrefix(ctx context.Context, prefix string) error
- func (r *Redis) Set(ctx context.Context, key string, val []byte, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶ added in v0.5.0
type Memory struct {
// contains filtered or unexported fields
}
Memory 内存驱动
func NewMemoryCache ¶
func NewMemoryCache() *Memory
func (*Memory) ScanDeleteByPrefix ¶ added in v0.5.0
type Redis ¶ added in v0.5.0
type Redis struct {
// contains filtered or unexported fields
}
Redis redis驱动
func NewRedisCache ¶
func NewRedisCache() *Redis
func (*Redis) ScanDeleteByPrefix ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.