Documentation ¶
Index ¶
- Variables
- 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) (nulltype.NullString, error)
- func (r *CacheImpl) GetBytes(key string) ([]byte, error)
- func (r *CacheImpl) Range() ([]*KV, error)
- func (r *CacheImpl) Set(key, val string, ttl time.Duration) error
- func (r *CacheImpl) SetBytes(key string, val []byte, ttl time.Duration) error
- func (r *CacheImpl) TTL(key string) (time.Duration, error)
- type FileCache
- type KV
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyExpired = errors.New("key expired")
)
View Source
var (
NullString = nulltype.NullString{}
)
Functions ¶
This section is empty.
Types ¶
type CacheImpl ¶
type CacheImpl struct {
// contains filtered or unexported fields
}
type FileCache ¶
type FileCache interface { GetBytes(key string) ([]byte, error) Get(key string) (nulltype.NullString, error) SetBytes(key string, val []byte, ttl time.Duration) error Set(key, val string, ttl time.Duration) error TTL(key string) (time.Duration, error) Expire(key string, ttl time.Duration) error Del(key string) error Range() ([]*KV, error) }
Click to show internal directories.
Click to hide internal directories.