Versions in this module Expand all Collapse all v2 v2.0.1 Aug 29, 2023 v2.0.0 Aug 28, 2023 Changes in this version + type GfCache struct + CachePrefix string + func New(cachePrefix string) *GfCache + func NewRedis(cachePrefix string) *GfCache + func (c *GfCache) Contains(ctx context.Context, key string) bool + func (c *GfCache) Data(ctx context.Context) map[interface{}]interface{} + func (c *GfCache) Get(ctx context.Context, key string) *gvar.Var + func (c *GfCache) GetOrSet(ctx context.Context, key string, value interface{}, duration time.Duration, ...) interface{} + func (c *GfCache) GetOrSetFunc(ctx context.Context, key string, f gcache.Func, duration time.Duration, ...) interface{} + func (c *GfCache) GetOrSetFuncLock(ctx context.Context, key string, f gcache.Func, duration time.Duration, ...) interface{} + func (c *GfCache) KeyStrings(ctx context.Context) []string + func (c *GfCache) Keys(ctx context.Context) []interface{} + func (c *GfCache) Remove(ctx context.Context, key string) interface{} + func (c *GfCache) RemoveByTag(ctx context.Context, tag string) + func (c *GfCache) RemoveByTags(ctx context.Context, tag []string) + func (c *GfCache) Removes(ctx context.Context, keys []string) + func (c *GfCache) Set(ctx context.Context, key string, value interface{}, duration time.Duration, ...) + func (c *GfCache) SetIfNotExist(ctx context.Context, key string, value interface{}, duration time.Duration, ...) bool + func (c *GfCache) Size(ctx context.Context) int + func (c *GfCache) Values(ctx context.Context) []interface{} + type IGCache interface + Contains func(ctx context.Context, key string) bool + Data func(ctx context.Context) map[interface{}]interface{} + Get func(ctx context.Context, key string) *gvar.Var + GetOrSet func(ctx context.Context, key string, value interface{}, duration time.Duration, ...) interface{} + GetOrSetFunc func(ctx context.Context, key string, f gcache.Func, duration time.Duration, ...) interface{} + GetOrSetFuncLock func(ctx context.Context, key string, f gcache.Func, duration time.Duration, ...) interface{} + KeyStrings func(ctx context.Context) []string + Keys func(ctx context.Context) []interface{} + Remove func(ctx context.Context, key string) interface{} + RemoveByTag func(ctx context.Context, tag string) + RemoveByTags func(ctx context.Context, tag []string) + Removes func(ctx context.Context, keys []string) + Set func(ctx context.Context, key string, value interface{}, duration time.Duration, ...) + SetIfNotExist func(ctx context.Context, key string, value interface{}, duration time.Duration, ...) bool + Size func(ctx context.Context) int + Values func(ctx context.Context) []interface{}