Documentation ¶
Index ¶
- type AerospikeCacher
- func (ac *AerospikeCacher) Connect(url string) error
- func (ac *AerospikeCacher) Delete(key string) (bool, error)
- func (ac *AerospikeCacher) Expire(key string, exp time.Duration) error
- func (ac *AerospikeCacher) ExpireTime(key string) (time.Duration, error)
- func (ac *AerospikeCacher) Flush() error
- func (ac *AerospikeCacher) Get(key string) ([]byte, error)
- func (ac *AerospikeCacher) Has(key string) (bool, error)
- func (ac *AerospikeCacher) Set(key string, val []byte, exp time.Duration) error
- type Cacher
- type MemcachedCacher
- func (mc *MemcachedCacher) Connect(url string) error
- func (mc *MemcachedCacher) Delete(key string) (bool, error)
- func (mc *MemcachedCacher) Expire(key string, exp time.Duration) error
- func (mc *MemcachedCacher) ExpireTime(key string) (time.Duration, error)
- func (mc *MemcachedCacher) Flush() error
- func (mc *MemcachedCacher) Get(key string) ([]byte, error)
- func (mc *MemcachedCacher) Has(key string) (bool, error)
- func (mc *MemcachedCacher) Set(key string, val []byte, exp time.Duration) error
- type RedisCacher
- func (rc *RedisCacher) Connect(url string) error
- func (rc *RedisCacher) Delete(key string) (bool, error)
- func (rc *RedisCacher) Expire(key string, exp time.Duration) error
- func (rc *RedisCacher) ExpireTime(key string) (time.Duration, error)
- func (rc *RedisCacher) Flush() error
- func (rc *RedisCacher) Get(key string) ([]byte, error)
- func (rc *RedisCacher) Has(key string) (bool, error)
- func (rc *RedisCacher) Set(key string, val []byte, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AerospikeCacher ¶
type AerospikeCacher struct {
// contains filtered or unexported fields
}
func InitAerospikeCacher ¶
func InitAerospikeCacher() *AerospikeCacher
func (*AerospikeCacher) Connect ¶
func (ac *AerospikeCacher) Connect(url string) error
func (*AerospikeCacher) Expire ¶
func (ac *AerospikeCacher) Expire(key string, exp time.Duration) error
func (*AerospikeCacher) ExpireTime ¶
func (ac *AerospikeCacher) ExpireTime(key string) (time.Duration, error)
func (*AerospikeCacher) Flush ¶
func (ac *AerospikeCacher) Flush() error
type Cacher ¶
type Cacher interface { Connect(url string) error Set(key string, val []byte, exp time.Duration) error Has(key string) (bool, error) Get(key string) ([]byte, error) Expire(key string, exp time.Duration) error ExpireTime(key string) (time.Duration, error) Delete(key string) (bool, error) Flush() error }
type MemcachedCacher ¶
type MemcachedCacher struct {
// contains filtered or unexported fields
}
func InitMemcachedCacher ¶
func InitMemcachedCacher() *MemcachedCacher
func (*MemcachedCacher) Connect ¶
func (mc *MemcachedCacher) Connect(url string) error
func (*MemcachedCacher) Expire ¶
func (mc *MemcachedCacher) Expire(key string, exp time.Duration) error
func (*MemcachedCacher) ExpireTime ¶
func (mc *MemcachedCacher) ExpireTime(key string) (time.Duration, error)
func (*MemcachedCacher) Flush ¶
func (mc *MemcachedCacher) Flush() error
type RedisCacher ¶
type RedisCacher struct {
// contains filtered or unexported fields
}
func InitRedisCacher ¶
func InitRedisCacher() *RedisCacher
func (*RedisCacher) Connect ¶
func (rc *RedisCacher) Connect(url string) error
func (*RedisCacher) ExpireTime ¶
func (rc *RedisCacher) ExpireTime(key string) (time.Duration, error)
func (*RedisCacher) Flush ¶
func (rc *RedisCacher) Flush() error
Click to show internal directories.
Click to hide internal directories.