Commit 010ce328 authored by Raymond Hettinger's avatar Raymond Hettinger

Minor change to default lru size. Set default to a power of two.

parent 3759877f
......@@ -40,7 +40,7 @@ The :mod:`functools` module defines the following functions:
.. versionadded:: 3.2
.. decorator:: lru_cache(maxsize=100, typed=False)
.. decorator:: lru_cache(maxsize=128, typed=False)
Decorator to wrap a function with a memoizing callable that saves up to the
*maxsize* most recent calls. It can save time when an expensive or I/O bound
......
......@@ -166,7 +166,7 @@ class _CacheKey(list):
def __hash__(self):
return self.hashvalue
def lru_cache(maxsize=100, typed=False):
def lru_cache(maxsize=128, typed=False):
"""Least-recently-used cache decorator.
If *maxsize* is set to None, the LRU features are disabled and the cache
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment