Versions in this module Expand all Collapse all v0 v0.1.0 Apr 10, 2025 Changes in this version + type Cache struct + func NewCache[T any](rc *redis.Client, key string, useHash ...bool) *Cache[T] + func (c *Cache[T]) Delete(ctx context.Context, field string) error + func (c *Cache[T]) Get(ctx context.Context, field string) (*T, error) + func (c *Cache[T]) GetArray(ctx context.Context, field string, dest any) error + func (c *Cache[T]) Key(field string) string + func (c *Cache[T]) Set(ctx context.Context, field string, data *T, expire ...time.Duration) error + func (c *Cache[T]) SetArray(ctx context.Context, field string, data any, expire ...time.Duration) error + type ICache interface + Delete func(context.Context, string) error + Get func(context.Context, string) (*T, error) + GetArray func(context.Context, string, any) error + Set func(context.Context, string, *T, ...time.Duration) error + SetArray func(context.Context, string, any, ...time.Duration) error