Home | Trees | Indices | Help |
|
---|
|
object --+ | dict --+ | Cache2
Two-level cache implemented by two dict
s, a primary
level-1 dict
and a secondary level-2 dict
.
Newly created key-value pairs are entered into the secondary
dict
. Repeatedly gotten key-value items are elevated from
the secondadry to the primary dict
.
The secondary 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 Wed Feb 5 15:29:04 2025 | http://epydoc.sourceforge.net |