Documentation ¶
Index ¶
- type Cache
- type CacheItem
- type InMemoryCache
- func (i *InMemoryCache) Close() error
- func (i *InMemoryCache) Delete(ctx context.Context, key string)
- func (i *InMemoryCache) Get(ctx context.Context, key string) (CacheItem, bool)
- func (i *InMemoryCache) Set(key string, data []byte)
- func (i *InMemoryCache) SetWithTTL(key string, data []byte, ttl time.Duration)
- type NoOpCache
- type RedisCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryCache ¶
type InMemoryCache struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func NewInMemory(maxSize int64) (*InMemoryCache, error)
func (*InMemoryCache) Close ¶ added in v0.120.0
func (i *InMemoryCache) Close() error
func (*InMemoryCache) Set ¶
func (i *InMemoryCache) Set(key string, data []byte)
func (*InMemoryCache) SetWithTTL ¶
func (i *InMemoryCache) SetWithTTL(key string, data []byte, ttl time.Duration)
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func (*RedisCache) Set ¶
func (r *RedisCache) Set(key string, data []byte)
func (*RedisCache) SetWithTTL ¶
func (r *RedisCache) SetWithTTL(key string, data []byte, ttl time.Duration)
Click to show internal directories.
Click to hide internal directories.