Documentation ¶
Index ¶
- type Cache
- func (c *Cache[T]) Copy() map[string]T
- func (c *Cache[T]) Delete(id string) bool
- func (c *Cache[T]) DeleteUnsafe(id string) (ok bool)
- func (c *Cache[T]) Get(id string) (t T, ok bool)
- func (c *Cache[T]) OnChange(onChange func(string, T, bool)) *Cache[T]
- func (c *Cache[T]) Release() (entries map[string]T)
- func (c *Cache[T]) Set(id string, t T)
- func (c *Cache[T]) SetUnsafe(id string, t T)
- func (c *Cache[T]) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
func (*Cache[T]) DeleteUnsafe ¶
Click to show internal directories.
Click to hide internal directories.