MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / prefetch

Method prefetch

openlibrary/core/models.py:164–169  ·  view source on GitHub ↗

Prefetch all the anticipated data.

(self)

Source from the content-addressed store, hash-verified

162 return preview.initial[0]
163
164 def prefetch(self) -> None:
165 """Prefetch all the anticipated data."""
166 preview = self.history_preview
167 authors = {v.author.key for v in preview.initial + preview.recent if v.author}
168 # preload them
169 self._site.get_many(list(authors))
170
171 def _make_url(self, label: str | None, suffix: str, relative: bool = True, **params) -> str:
172 """Make url of the form $key/$label$suffix?$params."""

Callers

nothing calls this directly

Calls 1

get_manyMethod · 0.45

Tested by

no test coverage detected