Documentation ¶
Index ¶
- type CacheDriver
- type RedisCacheDriver
- func (rcd *RedisCacheDriver) Del(keys ...string) (int64, error)
- func (rcd *RedisCacheDriver) Exists(keys ...string) (int64, error)
- func (rcd *RedisCacheDriver) Expire(key string, expiration time.Duration) (bool, error)
- func (rcd *RedisCacheDriver) HDel(key string, fields ...string) (int64, error)
- func (rcd *RedisCacheDriver) HGet(key string, field string) (string, error)
- func (rcd *RedisCacheDriver) HSet(key string, values ...interface{}) (int64, error)
- func (rcd *RedisCacheDriver) SAdd(key string, members ...interface{}) (int64, error)
- func (rcd *RedisCacheDriver) SIsMember(key string, member interface{}) (bool, error)
- func (rcd *RedisCacheDriver) SMembers(key string) ([]string, error)
- func (rcd *RedisCacheDriver) SRem(key string, members ...interface{}) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheDriver ¶
type CacheDriver interface { HGet(key string, field string) (string, error) HDel(key string, fields ...string) (int64, error) Del(keys ...string) (int64, error) HSet(key string, values ...interface{}) (int64, error) Exists(keys ...string) (int64, error) SIsMember(key string, member interface{}) (bool, error) SMembers(key string) ([]string, error) SRem(key string, members ...interface{}) (int64, error) SAdd(key string, members ...interface{}) (int64, error) Expire(key string, expiration time.Duration) (bool, error) }
func GetCacheDriver ¶
func GetCacheDriver(driverName string) (CacheDriver, error)
type RedisCacheDriver ¶
type RedisCacheDriver struct {
// contains filtered or unexported fields
}
func (*RedisCacheDriver) Exists ¶
func (rcd *RedisCacheDriver) Exists(keys ...string) (int64, error)
func (*RedisCacheDriver) HDel ¶
func (rcd *RedisCacheDriver) HDel(key string, fields ...string) (int64, error)
func (*RedisCacheDriver) HGet ¶
func (rcd *RedisCacheDriver) HGet(key string, field string) (string, error)
func (*RedisCacheDriver) HSet ¶
func (rcd *RedisCacheDriver) HSet(key string, values ...interface{}) (int64, error)
func (*RedisCacheDriver) SAdd ¶
func (rcd *RedisCacheDriver) SAdd(key string, members ...interface{}) (int64, error)
func (*RedisCacheDriver) SIsMember ¶
func (rcd *RedisCacheDriver) SIsMember(key string, member interface{}) (bool, error)
Click to show internal directories.
Click to hide internal directories.