Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCacheDataNotFound = errors.New("cache data not found")
)
Functions ¶
This section is empty.
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(client *redis.Client, expiresTime time.Duration) *RedisCache
func (*RedisCache) Clean ¶
func (r *RedisCache) Clean() error
func (*RedisCache) Del ¶
func (r *RedisCache) Del(key string) error
type TableCache ¶
func NewTableCache ¶
func NewTableCache[K huago.KeyAble, V any](h TableHandlerFunc[K, V]) *TableCache[K, V]
func (*TableCache[K, V]) Clean ¶
func (c *TableCache[K, V]) Clean() error
func (*TableCache[K, V]) Del ¶
func (c *TableCache[K, V]) Del(key K) error
func (*TableCache[K, V]) Get ¶
func (c *TableCache[K, V]) Get(key K) (V, error)
func (*TableCache[K, V]) Set ¶
func (c *TableCache[K, V]) Set(key K, val V) error
Click to show internal directories.
Click to hide internal directories.