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

Method set_multi

openlibrary/core/cache.py:329–334  ·  view source on GitHub ↗
(self, mapping: dict[str, Any], expires=0)

Source from the content-addressed store, hash-verified

327 return {k: json.loads(v) for k, v in d.items()}
328
329 def set_multi(self, mapping: dict[str, Any], expires=0):
330 mapping = {self._encode_key(k): json.dumps(v) for k, v in mapping.items()}
331 stats.begin("memcache.set_multi")
332 d = self.memcache.set_multi(mapping, expires)
333 stats.end()
334 return d
335
336 def set(self, key: str, value: Any, expires=0):
337 key = cast(str, web.safestr(key))

Callers 1

get_availability_asyncFunction · 0.45

Calls 3

_encode_keyMethod · 0.95
dumpsMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected