Documentation ¶ Index ¶ type Memory func New() *Memory func (m *Memory) Delete(ctx context.Context, key string) error func (m *Memory) Get(ctx context.Context, key string) ([]byte, error) func (m *Memory) Set(ctx context.Context, key string, val []byte, opts ...cache.SetOption) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Memory ¶ type Memory struct { sync.RWMutex // contains filtered or unexported fields } Memory is an implementation of cache.Cacher func New ¶ func New() *Memory New return new memory cache. func (*Memory) Delete ¶ func (m *Memory) Delete(ctx context.Context, key string) error Delete a value func (*Memory) Get ¶ func (m *Memory) Get(ctx context.Context, key string) ([]byte, error) Get a value func (*Memory) Set ¶ func (m *Memory) Set(ctx context.Context, key string, val []byte, opts ...cache.SetOption) error Set a value Source Files ¶ View all Source files memory.go Click to show internal directories. Click to hide internal directories.