(itemId uint64)
| 143 | } |
| 144 | |
| 145 | func (this *List) removeItem(itemId uint64) { |
| 146 | expiresAt, ok := this.itemsMap[itemId] |
| 147 | if !ok { |
| 148 | return |
| 149 | } |
| 150 | delete(this.itemsMap, itemId) |
| 151 | |
| 152 | expireItemMap, ok := this.expireMap[expiresAt] |
| 153 | if ok { |
| 154 | delete(expireItemMap, itemId) |
| 155 | if len(expireItemMap) == 0 { |
| 156 | delete(this.expireMap, expiresAt) |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | func (this *List) gcItems(timestamp int64) ItemMap { |
| 162 | this.mu.RLock() |