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

Method add

openlibrary/core/cache.py:344–350  ·  view source on GitHub ↗
(self, key, value, expires=0)

Source from the content-addressed store, hash-verified

342 return value
343
344 def add(self, key, value, expires=0):
345 key = web.safestr(key)
346 value = json.dumps(value)
347 stats.begin("memcache.add", key=key)
348 value = self.memcache.add(key, value, expires)
349 stats.end()
350 return value
351
352 def delete(self, key):
353 key = web.safestr(key)

Callers

nothing calls this directly

Calls 2

dumpsMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected