Documentation
¶
Index ¶
- func BuildCacheKey(cacheKey string) string
- func CacheDir(dir ...string) string
- func CacheKeyPrefix(prefix ...string) string
- func CacheKeyRedismqDelayable(cacheKey ...string) string
- func CacheKeyRedismqNormal(cacheKey ...string) string
- func DefaultStore(name ...string) string
- func WithFileCache()
- func WithMemoryCache(defaultTtl time.Duration, cleanupInterval time.Duration)
- func WithRedisCache(pool *redis.Pool)
- type CacheEntry
- type ICache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCacheKey ¶ added in v1.0.2
func CacheKeyPrefix ¶ added in v1.0.2
func CacheKeyRedismqDelayable ¶ added in v1.0.2
func CacheKeyRedismqNormal ¶ added in v1.0.2
func DefaultStore ¶ added in v1.0.2
func WithFileCache ¶ added in v1.0.2
func WithFileCache()
func WithMemoryCache ¶ added in v1.0.2
func WithRedisCache ¶ added in v1.0.2
Types ¶
type CacheEntry ¶ added in v1.0.2
type ICache ¶
type ICache interface {
Get(key string, defaultValue ...interface{}) interface{}
Set(key string, value interface{}, ttl ...interface{}) bool
Delete(key string) bool
Clear() bool
GetMultiple(keys []string, defaultValue ...interface{}) []interface{}
SetMultiple(entries []map[string]interface{}, ttl ...interface{}) bool
DeleteMultiple(keys []string) bool
Has(key string) bool
}
Click to show internal directories.
Click to hide internal directories.