summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.2.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.2.rst')
-rw-r--r--Doc/whatsnew/3.2.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index 91ab849..2d1f0ef 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -332,15 +332,13 @@ New, Improved, and Deprecated Modules
c.execute('SELECT phonenumber FROM phonelist WHERE name=?', (name,))
return c.fetchone()[0]
- XXX: update for Issue 10586 changes to cache statistics API
-
To help with choosing an effective cache size, the wrapped function is
- instrumented with two attributes *cache_hits* and *cache_misses*:
+ instrumented with info function:
>>> for name in user_requests:
... get_phone_number(name)
- >>> print(get_phone_number.cache_hits, get_phone_number.cache_misses)
- 4805 980
+ >>> get_phone_number.cache_info()
+ CacheInfo(maxsize=300, size=300, hits=4805, misses=980)
If the phonelist table gets updated, the outdated contents of the cache can be
cleared with: