This question already has an answer here:

I have functions defined to remember their values


I would like to be able to close a notebook without losing the computed values, what is the simplest/appropriate way to do so?

Would DumpSave[] work?


The solution in the duplicate answer doesn't mention the specific construct I'm using and is not simple, because modifying every object to include a Once[] statement makes the code harder to read and to mantain, hence it isn't simple.

One of the solutions proposed is to use DumpSave but doesn't provide an example of how to use it and it's not clear whether it will work in my case.


marked as duplicate by Roman, m_goldberg, MarcoB, Alex Trounev, LCarvalho May 13 at 11:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ If you need help that is so specific that a generic DumpSave won't work, then you should explain what exactly is the problem you are facing. What about DumpSave doesn't work? What have you tried? $\endgroup$ – Roman May 12 at 13:04
  • $\begingroup$ I'm not sure whether dumpsave will or will not work. The problem is exactly as the one in the answer but I can't test it right now and figured having this as a question is good. I'll try it when I get back to my computer tomorrow. $\endgroup$ – Three Diag May 12 at 13:31