| 324 | self.pending_archives[archive_inode] = archive |
| 325 | |
| 326 | def get_item(self, inode): |
| 327 | item = self._inode_cache.get(inode) |
| 328 | if item is not None: |
| 329 | return item |
| 330 | try: |
| 331 | # this is a cheap get-from-dictionary operation, no need to cache the result. |
| 332 | return self._items[inode] |
| 333 | except KeyError: |
| 334 | # while self.cache does some internal caching, it has still quite some overhead, so we cache the result. |
| 335 | item = self.cache.get(inode) |
| 336 | self._inode_cache[inode] = item |
| 337 | return item |
| 338 | |
| 339 | def check_pending_archive(self, inode): |
| 340 | # Check if this is an archive we need to load |