MCPcopy Index your code
hub / github.com/pyload/pyload / cached

Method cached

module/lib/beaker/cache.py:411–417  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

409 def decorate(func):
410 namespace = util.func_namespace(func)
411 def cached(*args):
412 if not cache[0]:
413 cache[0] = self.get_cache(namespace, **kwargs)
414 cache_key = key + " " + " ".join(str(x) for x in args)
415 def go():
416 return func(*args)
417 return cache[0].get_value(cache_key, createfunc=go)
418 cached._arg_namespace = namespace
419 return cached
420 return decorate

Callers

nothing calls this directly

Calls 3

get_cacheMethod · 0.95
joinMethod · 0.80
get_valueMethod · 0.80

Tested by

no test coverage detected