10000
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 6a528cc commit c707400Copy full SHA for c707400
Doc/library/functools.rst
@@ -85,6 +85,11 @@ The :mod:`functools` module defines the following functions:
85
The cache's size limit assures that the cache does not grow without bound on
86
long-running processes such as web servers.
87
88
+ In general, the LRU cache should only be used when you want to reuse
89
+ previously computed values. Accordingly, it doesn't make sense to cache
90
+ functions with side-effects, functions that need to create distinct mutable
91
+ objects on each call, or impure functions such as time() or random().
92
+
93
Example of an LRU cache for static web content::
94
95
@lru_cache(maxsize=32)
0 commit comments