()
| 13 | } |
| 14 | |
| 15 | func newLRUIdCache() lruIdCache { |
| 16 | // we can ignore the error here as it would only fail if the size is negative. |
| 17 | cache, _ := lru.New[entity.Id, *struct{}](math.MaxInt32) |
| 18 | return lruIdCache{Cache: cache} |
| 19 | } |
| 20 | |
| 21 | func (c *lruIdCache) Add(id entity.Id) bool { |
| 22 | return c.Cache.Add(id, nil) |