Skip to content

Commit 072b7e1

Browse files
DeflateAwningtkem
authored andcommitted
docs: clarify what units the ttl argument uses (i.e., seconds)
1 parent b620ef9 commit 072b7e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cachetools/func.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def ttl_cache(maxsize=128, ttl=600, timer=time.monotonic, typed=False):
9292
"""Decorator to wrap a function with a memoizing callable that saves
9393
up to `maxsize` results based on a Least Recently Used (LRU)
9494
algorithm with a per-item time-to-live (TTL) value.
95+
96+
By default, the time-to-live is set to 600 seconds (10 minutes).
9597
"""
9698
if maxsize is None:
9799
return _cache(_UnboundTTLCache(ttl, timer), None, typed)

0 commit comments

Comments
 (0)