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 @@ -191,6 +191,9 @@ The :mod:`functools` module defines the following functions:
191
191
The cache keeps references to the arguments and return values until they age
192
192
out of the cache or until the cache is cleared.
193
193
194
+ If a method is cached, the `self ` instance argument is included in the
195
+ cache. See :ref: `faq-cache-method-calls `
196
+
194
197
An `LRU (least recently used) cache
195
198
<https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)> `_
196
199
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