(cls, tags=None)
| 38 | |
| 39 | @classmethod |
| 40 | def iter_items(cls, tags=None) -> Generator[CacheItem, None, None]: |
| 41 | tags = set(tags or ()) |
| 42 | |
| 43 | for x in Cache.get_location().iterdir(): |
| 44 | if not x.name.endswith(".metadata.json"): |
| 45 | continue |
| 46 | |
| 47 | obj = cls(x) |
| 48 | |
| 49 | if tags: |
| 50 | if obj.type in tags or tags.intersection(obj.tags): |
| 51 | yield obj |
| 52 | else: |
| 53 | yield obj |
| 54 | |
| 55 | @property |
| 56 | def mtime(self) -> int: |