File tree 2 files changed +5
-0
lines changed
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1897,6 +1897,8 @@ The classes can be used like this:
1897
1897
'blog-why-python-rocks'
1898
1898
1899
1899
1900
+ .. _faq-cache-method-calls :
1901
+
1900
1902
How do I cache method calls?
1901
1903
----------------------------
1902
1904
Original file line number Diff line number Diff line change @@ -197,6 +197,9 @@ The :mod:`functools` module defines the following functions:
197
197
The cache keeps references to the arguments and return values until they age
198
198
out of the cache or until the cache is cleared.
199
199
200
+ If a method is cached, the `self ` instance argument is included in the
201
+ cache. See :ref: `faq-cache-method-calls `
202
+
200
203
An `LRU (least recently used) cache
201
204
<https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)> `_
202
205
works best when the most recent calls are the best predictors of upcoming
You can’t perform that action at this time.
0 commit comments