Versions in this module Expand all Collapse all v0 v0.1.0 Oct 27, 2022 Changes in this version + const DefaultCapacity + type Cache struct + func New(cacheOptions ...CacheOption) *Cache[K, V] + func (c *Cache[K, V]) Delete(key K) bool + func (c *Cache[K, V]) Flush() + func (c *Cache[K, V]) Get(key K) (value V, ok bool) + func (c *Cache[K, V]) Len() int + func (c *Cache[K, V]) Peek(key K) (value V, ok bool) + func (c *Cache[K, V]) Set(key K, value V) + type CacheOption interface + func WithCapacity(capacity int) CacheOption + type SyncCache struct + func NewSync(options ...CacheOption) *SyncCache[K, V] + func (c *SyncCache[K, V]) Delete(key K) bool + func (c *SyncCache[K, V]) Flush() + func (c *SyncCache[K, V]) Get(key K) (value V, ok bool) + func (c *SyncCache[K, V]) Len() int + func (c *SyncCache[K, V]) Peek(key K) (value V, ok bool) + func (c *SyncCache[K, V]) Set(key K, value V)