Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8dc62d

Browse files
committed
Add example applications for the LRU and LFU cache docs.
1 parent a2fa2e5 commit c8dc62d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Doc/library/functools.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ The :mod:`functools` module defines the following functions:
5959
<http://en.wikipedia.org/wiki/Cache_algorithms#Least-Frequently_Used>`_
6060
is indicated when the pattern of calls does not change over time, when
6161
more the most common calls already seen are the best predictors of the
62-
most common upcoming calls.
62+
most common upcoming calls (for example, a phonelist of popular
63+
help-lines may have access patterns that persist over time).
6364

6465
.. versionadded:: 3.2
6566

@@ -84,7 +85,9 @@ The :mod:`functools` module defines the following functions:
8485
A `LRU (least recently used) cache
8586
<http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used>`_
8687
is indicated when the pattern of calls changes over time, such as
87-
when more recent calls are the best predictors of upcoming calls.
88+
when more recent calls are the best predictors of upcoming calls
89+
(for example, the most popular articles on a news server tend to
90+
change every day).
8891

8992
.. versionadded:: 3.2
9093

0 commit comments

Comments
 (0)