cache

This module contains a simple cache implementation

class mosaic_orchestrator.cache.Cache(directory='.cache')[source]

simple file cache implementation. Keys are used as filenames and values are saved inside the file.

clear(key: Optional[str] = None)[source]

removes an entry for given key, if key is None, the entire cache is cleared

get(key: str)[source]

return the value for the given key, None if not available

put(key: str, value)[source]

puts a value for the given key into the cache, if value is none, the entry is deleted