Mercurial > public > mercurial-scm > hg
diff tests/test-lrucachedict.py.out @ 18603:2251b3184e6e
util: add an LRU cache dict
In certain cases we would like to have a cache of the last N results of a
given computation, where N is small. This will be used in an upcoming patch to
increase the size of the manifest cache from 1 to 3.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sat, 09 Feb 2013 15:41:46 +0000 |
parents | |
children | 887ffa22fd0d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-lrucachedict.py.out Sat Feb 09 15:41:46 2013 +0000 @@ -0,0 +1,26 @@ +'a' in d: True +d['a']: va +'b' in d: True +d['b']: vb +'c' in d: True +d['c']: vc +'d' in d: True +d['d']: vd +'a' in d: False +'b' in d: True +d['b']: vb +'c' in d: True +d['c']: vc +'d' in d: True +d['d']: vd +'e' in d: True +d['e']: ve +'b' in d: True +d['b']: vb2 +'c' in d: True +d['c']: vc2 +'d' in d: True +d['d']: vd +'e' in d: False +'f' in d: True +d['f']: vf