Documentation ¶
Index ¶
- Constants
- Variables
- func Del(ctx context.Context, key string)
- func DelByTag(ctx context.Context, tag string)
- func Expire(key string, expire time.Duration)
- func Get(ctx context.Context, key string) string
- func GetFromFallBack(ctx context.Context, key string) string
- func GetKeys(ctx context.Context, tag string) []string
- func GetList(ctx context.Context, key string, start, stop int64) ([]string, error)
- func Has(key string) bool
- func Set(key, value string, expire time.Duration)
- func SetUpRedis(db int, Cluster int)
- func SetUpRedisCluster(nodes []string) error
- func Tag(tag, key string) bool
- type Cache
- type Cacheable
- type ICacheable
- type Tags
Constants ¶
View Source
const KeyPrefix = "Cache"
Variables ¶
View Source
var EmptyCacheError = errors.New("Cachable: No results found")
Functions ¶
func SetUpRedis ¶
func SetUpRedisCluster ¶
Types ¶
type Cacheable ¶
type Cacheable struct { LastUpdated time.Time `json:"last_updated,omitempty"` // contains filtered or unexported fields }
func NewCachable ¶
func NewCachable(prefix, id string, parentPtr ICacheable) (*Cacheable, error)
type ICacheable ¶
Click to show internal directories.
Click to hide internal directories.