Documentation
¶
Index ¶
- Variables
- type CacheService
- func (s *CacheService) Delete(ctx context.Context, key string) error
- func (s *CacheService) Exists(ctx context.Context, key string) bool
- func (s *CacheService) Get(ctx context.Context, key string, value interface{}) error
- func (s *CacheService) Remember(ctx context.Context, key string, val interface{}, ttl time.Duration, ...) error
- func (s *CacheService) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCacheMiss = errors.New("cache: key is missing")
)
Functions ¶
This section is empty.
Types ¶
type CacheService ¶
type CacheService struct {
// contains filtered or unexported fields
}
func NewCacheService ¶
func NewCacheService(redis rediser, tinyLFUSize int, tinyLFUTime time.Duration) *CacheService
func (*CacheService) Get ¶
func (s *CacheService) Get(ctx context.Context, key string, value interface{}) error
Click to show internal directories.
Click to hide internal directories.