File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 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:
18971897 'blog-why-python-rocks'
18981898
18991899
1900+ .. _faq-cache-method-calls :
1901+
19001902How do I cache method calls?
19011903----------------------------
19021904
Original file line number Diff line number Diff line change @@ -191,6 +191,9 @@ The :mod:`functools` module defines the following functions:
191191 The cache keeps references to the arguments and return values until they age
192192 out of the cache or until the cache is cleared.
193193
194+ If a method is cached, the `self ` instance argument is included in the
195+ cache. See :ref: `faq-cache-method-calls `
196+
194197 An `LRU (least recently used) cache
195198 <https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)> `_
196199 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