Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Clear(ctx context.Context) error
- func (c *Cache) Close(ctx context.Context) error
- func (c *Cache) Delete(ctx context.Context, key string) error
- func (c *Cache) Exists(ctx context.Context, key string) (bool, error)
- func (c *Cache) Get(ctx context.Context, key string) (string, error)
- func (c *Cache) GetAndDelete(ctx context.Context, key string) (string, error)
- func (c *Cache) Set(ctx context.Context, key string, value string, exp ...time.Duration) error
- type CacheItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is an in-memory cache implementation.
func NewCache ¶
func NewCache(config *cachev1.MemoryConfig) *Cache
NewCache creates a new instance of Cache with the given configuration.
func (*Cache) GetAndDelete ¶
GetAndDelete retrieves the value associated with the given key and deletes it.
Click to show internal directories.
Click to hide internal directories.