aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThomas Kemmer <tkemmer@computer.org>2014-12-10 06:50:01 +0100
committerThomas Kemmer <tkemmer@computer.org>2014-12-15 19:28:03 +0100
commitb624bf83a2930164b74630c8141b8eb1bb659b1a (patch)
tree2b791ac05a16f4db66ae73b9fde1005ba12cec01 /docs
parentd7cb99468c24cc6f88c1a71687175c264771bc9b (diff)
downloadcachetools-b624bf83a2930164b74630c8141b8eb1bb659b1a.tar.gz
Use NestedTimer for TTLCache.
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst18
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