Shift all cache layers left to reclaim an unused prefix span.
(self, count: int)
| 364 | positions[count:].fill_(-1) |
| 365 | |
| 366 | def trim_left(self, count: int) -> None: |
| 367 | """Shift all cache layers left to reclaim an unused prefix span.""" |
| 368 | if not isinstance(count, int) or count < 0: |
| 369 | raise ValueError("trim count must be a non-negative integer") |
| 370 | if count == 0: |
| 371 | return |
| 372 | for layer in self._layers: |
| 373 | layer._trim_left(count) |
| 374 | |
| 375 | def update( |
| 376 | self, |