Documentation ¶
Index ¶
Constants ¶
View Source
const ( MEMORY_CACHE_TYPE = "Memory" REDIS_CACHE_TYPE = "Redis" )
Variables ¶
View Source
var Err_KEY_NOT_FOUND = fmt.Errorf("key not found")
Functions ¶
This section is empty.
Types ¶
type Cache
deprecated
type Cache interface { Get(key string) (interface{}, error) Set(key string, value interface{}) error SetWithExpiration(key string, value interface{}, expiration time.Duration) error GetCtx(ctx context.Context, key string) (interface{}, error) SetCtx(ctx context.Context, key string, value interface{}) error SetWithExpirationCtx( ctx context.Context, key string, value interface{}, expiration time.Duration, ) error Delete(key string) error DeleteCtx(ctx context.Context, key string) error Keys(pattern string) ([]string, error) KeysCtx(ctx context.Context, pattern string) ([]string, error) WithLogger(l *zap.Logger) Cache WithTracer(t *tracer.AppInsightsCore) Cache WithName(name string) Cache }
Deprecated: will be retired soon
func InitMemoryCache
deprecated
func InitRedisCache
deprecated
Click to show internal directories.
Click to hide internal directories.