diff options
author | Thomas Kemmer <tkemmer@computer.org> | 2014-12-10 06:50:01 +0100 |
---|---|---|
committer | Thomas Kemmer <tkemmer@computer.org> | 2014-12-15 19:28:03 +0100 |
commit | b624bf83a2930164b74630c8141b8eb1bb659b1a (patch) | |
tree | 2b791ac05a16f4db66ae73b9fde1005ba12cec01 /docs | |
parent | d7cb99468c24cc6f88c1a71687175c264771bc9b (diff) | |
download | cachetools-b624bf83a2930164b74630c8141b8eb1bb659b1a.tar.gz |
Use NestedTimer for TTLCache.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/docs/index.rst b/docs/index.rst index a5eae45..49dc379 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -101,24 +101,6 @@ of one argument used to retrieve the size of an item's value. .. autoclass:: TTLCache :members: - :exclude-members: ExpiredError - - Note that a cache item may expire at *any* time, so iterating over - the items of a :class:`TTLCache` may raise :exc:`KeyError` - unexpectedly:: - - from cachetools import TTLCache - import time - - cache = TTLCache(maxsize=100, ttl=1.0) - cache.update({1: 1, 2: 2, 3: 3}) - - for key in cache: - time.sleep(0.5) - try: - print(cache[key]) - except KeyError: - print('Key %r has expired' % key) Function Decorators |