Cache the values in memory and save to disk at exit

This makes the retrieval of values obviously much faster and preserve
their values across runs.