Documentation ¶
Index ¶
- Constants
- Variables
- type Cache
- type CacheImpl
- func (r *CacheImpl) Del(key string) error
- func (r *CacheImpl) Expire(key string, ttl time.Duration) error
- func (r *CacheImpl) Get(key string) (string, error)
- func (r *CacheImpl) Range() ([]*KV, error)
- func (r *CacheImpl) Set(key, val string, ttl time.Duration) error
- func (r *CacheImpl) TTL(key string) (time.Duration, error)
- type KV
Constants ¶
View Source
const MaxLengthKey = 244
View Source
const MaxLengthValue = 1024
Variables ¶
View Source
var FileSizeTooLarge = errors.New("file size too large(>100M)")
View Source
var HashConflict = errors.New("hash conflict")
View Source
var InvalidFileSize = errors.New("invalid file size")
View Source
var KeyTooLong = errors.New("key too long")
View Source
var KeyTooShort = errors.New("key too short")
View Source
var NotFound = errors.New("not found")
View Source
var ValueTooLong = errors.New("value too long")
View Source
var ValueTooShort = errors.New("value too short")
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Click to show internal directories.
Click to hide internal directories.