Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a713ea

Browse files
Hels15AA-Turnerkumaraditya303
authored
gh-107619: Extend functools LRU cache docs with generators and async functions (#107934)
Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
1 parent b1e5d2c commit 1a713ea

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/library/functools.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ The :mod:`functools` module defines the following functions:
226226

227227
In general, the LRU cache should only be used when you want to reuse
228228
previously computed values. Accordingly, it doesn't make sense to cache
229-
functions with side-effects, functions that need to create distinct mutable
230-
objects on each call, or impure functions such as time() or random().
229+
functions with side-effects, functions that need to create
230+
distinct mutable objects on each call (such as generators and async functions),
231+
or impure functions such as time() or random().
231232

232233
Example of an LRU cache for static web content::
233234

0 commit comments

Comments
 (0)