Storage
full name: tenpy.tools.cache.Storage
parent module:
tenpy.tools.cachetype: class
Inheritance Diagram

Methods
|
|
Close opened files, free memory and clean up temporary files/directories. |
|
|
Interface for cleaning up a previously saved data from disk in subclasses. |
|
Interface for loading data from disk in subclasses. |
|
|
|
Interface for preloading data into the given dictionary into. |
|
Interface for saving data to disk in subclasses. |
|
Create another instance of the same class saving in a subdirectory/subgroup. |
Class Attributes and Properties
Whether the storage is actually kept in memory, instead of saving to disk. |
- class tenpy.tools.cache.Storage[source]
Bases:
objectA container interface for saving data to disk.
Subclasses implement different methods for
save()andload(). The vanillaStorageclass is “trivial” in the sense that it actually doesn’t save the data to disk, but keeps explicit references in RAM.- trivial = True
Whether the storage is actually kept in memory, instead of saving to disk.
- subcontainer(name)[source]
Create another instance of the same class saving in a subdirectory/subgroup.
This method allows multiple
DictCacheinstance re-using open resources. Subcontainers will explicitly be closed when any of the parent containers (on which subcontainer() was called) is closed.
- preload(key)[source]
Interface for preloading data into the given dictionary into.
Only overridden in
ThreadedStoragefor thread-parallelized pre-loading; in other cases it does nothing.