ipython/ipython — pull request #4358 by rossant (2013-10-07 18:17:39+00:00)
Title: New %%cache cell magic

Use case: in a notebook, some cells take a long time to execute and I want to persistently cache the results. When executing the same cell again, I want the variables defined therein to be loaded in the namespace from the cache, and the cell's code to be skipped.

The built-in `%store` could fit, except that:

* it looks like only 1 variable can be saved at a time
* the variables are saved in the profile directory, whereas I'd like to control where the results are saved (e.g. in the current working directory, with a specific name)
* I need to implement a "if cache exists, skip this cell" logic myself.

An example [can be found here](http://nbviewer.ipython.org/6871725).

This feature might already exist somewhere but I haven't been able to find it.

Comments and suggestions are welcome!