NoCache
- class hybrid_learning.datasets.caching.NoCache[source]
Bases:
CacheDummy cache that has no effect.
Public Methods:
put(descriptor, obj)Store
objin this cache.load(descriptor)Load the object stored under key
descriptorfrom cache.Return all descriptors for which an element is cached.
clear()Clear the current cache.
Inherited from : py: class:Cache
put(descriptor, obj)Store
objin this cache.load(descriptor)Load the object stored under key
descriptorfrom cache.put_batch(descriptors, objs)Store a batch of
objsin this cache using accordingdescriptors.load_batch(descriptors[, return_none_if])Load a batch of objects.
clear()Clear the current cache.
Return all descriptors for which an element is cached.
as_dict()Return a dict with all cached descriptors and objects.
wrap(getitem[, descriptor_map])Add this cache to the deterministic function
getitem(which should have no side effects).Special Methods:
__add__(other)Return a (cascaded) cache which will first lookup
selfthenotherwith default sync mode.__radd__(other)Return a (cascaded) cache which will first lookup
otherthenselfwith default sync mode.
- __add__(other)[source]
Return a (cascaded) cache which will first lookup
selfthenotherwith default sync mode. In caseotherisNoneor a dummyNoCache, returnself.- Returns
one of the summands in case the other is a no-op, else a
CacheCascadetransforms.- Parameters
- Return type
- __radd__(other)[source]
Return a (cascaded) cache which will first lookup
otherthenselfwith default sync mode. See__add__().