Shift all cache layers left to reclaim an unused prefix span.
(self, count: int)
| 281 | positions[count:].fill_(-1) |
| 282 | |
| 283 | def trim_left(self, count: int) -> None: |
| 284 | """Shift all cache layers left to reclaim an unused prefix span.""" |
| 285 | if not isinstance(count, int) or count < 0: |
| 286 | raise ValueError("trim count must be a non-negative integer") |
| 287 | if count == 0: |
| 288 | return |
| 289 | for layer in self._layers: |
| 290 | layer._trim_left(count) |
| 291 | |
| 292 | def update( |
| 293 | self, |