We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c1592e commit 6c12091Copy full SHA for 6c12091
Doc/library/functools.rst
@@ -80,6 +80,11 @@ The :mod:`functools` module defines the following functions:
80
The cache's size limit assures that the cache does not grow without bound on
81
long-running processes such as web servers.
82
83
+ In general, the LRU cache should only be used when you want to reuse
84
+ previously computed values. Accordingly, it doesn't make sense to cache
85
+ functions with side-effects, functions that need to create distinct mutable
86
+ objects on each call, or impure functions such as time() or random().
87
+
88
Example of an LRU cache for static web content::
89
90
@lru_cache(maxsize=32)
0 commit comments