MemoryList 内存缓存列表管理
| 14 | |
| 15 | // MemoryList 内存缓存列表管理 |
| 16 | type MemoryList struct { |
| 17 | count int64 |
| 18 | |
| 19 | itemMaps map[string]map[string]*Item // prefix => { hash => item } |
| 20 | |
| 21 | prefixes []string |
| 22 | locker sync.RWMutex |
| 23 | onAdd func(item *Item) |
| 24 | onRemove func(item *Item) |
| 25 | |
| 26 | purgeIndex int |
| 27 | } |
| 28 | |
| 29 | func NewMemoryList() ListInterface { |
| 30 | return &MemoryList{ |
nothing calls this directly
no outgoing calls
no test coverage detected