Documentation ¶
Index ¶
- type Cache
- func (c *Cache[T]) ExistOrPut(key string, val T, t ...time.Duration) bool
- func (c *Cache[T]) Get(key string) (T, bool)
- func (c *Cache[T]) GetOrPut(key string, val T, t ...time.Duration) T
- func (c *Cache[T]) Put(key string, val T, t ...time.Duration)
- func (c *Cache[T]) PutLockFunc(key string, f func() (T, time.Duration, error)) error
- type CacheItem
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.