Documentation ¶
Index ¶
- type Cache
- func (cache *Cache[TYPE]) Add(value *TYPE)
- func (cache *Cache[TYPE]) Delete(value *TYPE)
- func (cache *Cache[TYPE]) DeleteBy(keyName string, keyValue any)
- func (cache *Cache[TYPE]) FindBy(keyName string, keyValue any) (value *TYPE, ok bool)
- func (cache *Cache[TYPE]) FindsOf(indexName string, indexValue any) (values []*TYPE)
- func (cache *Cache[TYPE]) Reset(keyName string, keyValue any, fun func(value *TYPE)) (ok bool)
- func (cache *Cache[TYPE]) RollFor(reason string) (value *TYPE, ok bool)
- type Index
- type Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
索引信息不能变,不能重复
func New ¶
依照temp类型创建一个过期时间为lifetime容器存储存储TYPE.lifetime为0永不过期. 示例 devices = New[debvice.Deveice](nil *device.kxb, 0)
Click to show internal directories.
Click to hide internal directories.