Part of storm.cache View In Hierarchy
This prevents recently used objects from being deallocated by Python
even if the user isn't holding any strong references to it. It does that
by holding strong references to the objects referenced by the last
obj_infos added to it (where
the cache size).
|Method||clear||Clear the entire cache at once.|
|Method||set_size||Set the maximum number of objects that may be held in this cache.|
|Method||get_cached||Return an ordered list of the currently cached
obj_infoas the most recent entry in the cache.
obj_info is already in the cache, it remains in the
cache and has its order changed to become the most recent entry (IOW, will
be the last to leave).
obj_infofrom the cache, if present.
|Returns||True if |
If the size is reduced, older
obj_infos may be dropped from
the cache to respect the new size.