(self)
| 485 | return "%s: %i valid items. Timeout=%rs" % (self.name, len(self), self.timeout) # noqa: E501 |
| 486 | |
| 487 | def __repr__(self): |
| 488 | # type: () -> str |
| 489 | s = [] |
| 490 | if self: |
| 491 | mk = max(len(k) for k in self) |
| 492 | fmt = "%%-%is %%s" % (mk + 1) |
| 493 | for item in self.items(): |
| 494 | s.append(fmt % item) |
| 495 | return "\n".join(s) |
| 496 | |
| 497 | def copy(self): |
| 498 | # type: () -> CacheInstance |