pymaid
pymaid copied to clipboard
function to save and restore snapshots of data
Related: add 'snapshot mode' to CatmaidInstance. In this mode, a remote instance would store all queried urls and the responses (e.g. a pickle file). A new CatmaidInstance would then accept that file as parameter and use it as primary source for URLs stored in that file.
See here for example of memoization. Could use cache=True parameter and a .save_cache & .restore_cache method.
Ended up writing my own implementation for memoization using OrdereredDict. First version committed in 7ca2c5b89b1c6dab2d087168d3c0fd7ed855826d. Will keep this issue open to track bugs and feature ideas.