| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
dict --+
|
Cache2
Two-level cache implemented by two dicts, a primary
level-1 dict and a secondary level-2 dict.
Frequently gotten key-value items are elevated into this, the primary
level-1 dict. Newly created key-value pairs are entered
into the secondary level-2 dict.
The secondary level-2 dict can optionally be limited in
size to avoid excessive growth.
| Instance Methods | |||
new empty dictionary |
|
||
| True if D has a key k, else False |
|
||
|
|||
|
|||
| D[k] if k in D, else d |
|
||
| v, remove specified key and return the corresponding value |
|
||
| (k, v), remove and return some (key, value) pair as a |
|
||
| None |
|
||
|
Inherited from Inherited from |
|||
| Class Variables | |
|
Inherited from |
| Properties | |
|
dict2 Get the secondary level-2 dict.
|
|
|
limit2 Get the secondary level-2 dict size limit
(int or None).
|
|
|
Inherited from |
|
| Method Details |
New Cache2, optionally limited in size.
|
|
x[y]
|
x[i]=y
|
Return the specified item's value.
|
Remove the specified item.
Note:
If key is not in the primary level-1 |
Remove the item most recently elevated into the primary level-1
Note:
Use |
Update this cache with one or more additional items.
|
| Property Details |
dict2Get the secondary level-2
|
limit2Get the secondary level-2
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun Aug 12 21:20:50 2018 | http://epydoc.sourceforge.net |