Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoryCache ¶
type MemoryCache struct {
freelru.Cache[string, *adapter.SavedBinary]
}
func NewMemory ¶
func NewMemory(timeout time.Duration) *MemoryCache
func (*MemoryCache) Close ¶
func (c *MemoryCache) Close() error
func (*MemoryCache) LoadBinary ¶
func (c *MemoryCache) LoadBinary(tag string) (*adapter.SavedBinary, error)
func (*MemoryCache) SaveBinary ¶
func (c *MemoryCache) SaveBinary(tag string, binary *adapter.SavedBinary) error
func (*MemoryCache) Start ¶
func (c *MemoryCache) Start() error
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedis ¶
func NewRedis(ctx context.Context, timeout time.Duration, options option.RedisCacheOptions) (*RedisCache, error)
func (*RedisCache) Close ¶
func (r *RedisCache) Close() error
func (*RedisCache) LoadBinary ¶
func (r *RedisCache) LoadBinary(tag string) (*adapter.SavedBinary, error)
func (*RedisCache) SaveBinary ¶
func (r *RedisCache) SaveBinary(tag string, binary *adapter.SavedBinary) error
func (*RedisCache) Start ¶
func (r *RedisCache) Start() error
Click to show internal directories.
Click to hide internal directories.