Documentation
¶
Index ¶
- Constants
- type Cache
- func (c Cache) Close(ctx context.Context) error
- func (c Cache) Del(ctx context.Context, key string) error
- func (c Cache) Exist(ctx context.Context, key string) (bool, error)
- func (c Cache) Get(ctx context.Context, key string) (string, error)
- func (c Cache) Incr(ctx context.Context, key string) (int64, error)
- func (c Cache) Set(ctx context.Context, key string, val string, ttlInSecond int) error
- type CacheMethod
- type Config
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
type CacheMethod ¶
type CacheMethod interface {
Set(ctx context.Context, key string, val string, ttlInSecond int) error
Get(ctx context.Context, key string) (string, error)
Del(ctx context.Context, key string) error
Exist(ctx context.Context, key string) (bool, error)
Incr(ctx context.Context, key string) (int64, error)
Close(ctx context.Context) error
}
Click to show internal directories.
Click to hide internal directories.