[New-bugs-announce] [issue10586] Enhanced cache access API for functools.lru_cache

Nick Coghlan report at bugs.python.org
Tue Nov 30 05:12:09 CET 2010

New submission from Nick Coghlan <ncoghlan at gmail.com>:

As per private email to Raymond, I would like to move the lru_cache access attributes and methods into a CacheInfo class, exposed as a "cache" attribute with several methods and read-only properties.

Read-only properties: hits, misses, maxsize
Methods: clear(), __len__()

As an implementation detail, cache_misses and cache_hits become nonlocal variables rather than attributes of the wrapper function.

Priority set to high, since the current API will be locked in as soon the first beta goes out.

assignee: rhettinger
files: functools_lru_cache_introspection.diff
keywords: patch
messages: 122879
nosy: georg.brandl, ncoghlan, rhettinger
priority: high
severity: normal
status: open
title: Enhanced cache access API for functools.lru_cache
versions: Python 3.2
Added file: http://bugs.python.org/file19880/functools_lru_cache_introspection.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list