Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncodingCache ¶
type EncodingCache struct {
// contains filtered or unexported fields
}
EncodingCache cache in map by decode and encode.
func NewEncodingCache ¶
func NewEncodingCache(opts ...Option) *EncodingCache
NewEncodingCache create new cache.
func (*EncodingCache) Delete ¶
func (c *EncodingCache) Delete(ctx context.Context, key interface{}) error
Delete delete item from cache.
func (*EncodingCache) Get ¶
func (c *EncodingCache) Get(ctx context.Context, key, value interface{}) error
Get gets item from cache and delete if expired.
Click to show internal directories.
Click to hide internal directories.