MCPcopy Index your code
hub / github.com/python/cpython / cache

Function cache

Lib/functools.py:747–749  ·  view source on GitHub ↗

Simple lightweight unbounded cache. Sometimes called "memoize".

(user_function, /)

Source from the content-addressed store, hash-verified

745################################################################################
746
747def cache(user_function, /):
748 'Simple lightweight unbounded cache. Sometimes called "memoize".'
749 return lru_cache(maxsize=None)(user_function)
750
751
752################################################################################

Callers

nothing calls this directly

Calls 1

lru_cacheFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…