This project has moved and is read-only. For the latest updates, please go here.

Is PersistentDictionary loaded into memory?

Nov 13, 2013 at 4:30 PM
My app is going to (over time) end up with a very large dictionary and I'm wondering if the PersistentDictionary needs to be treated as a memory dictionary with a backing store, or more like a database - i.e.. Is the whole dictionary loaded into memory, or only "on demand". Assuming its on-demand, is there a mechanism of flushing the cache or is that not something I need to worry about?

Nov 13, 2013 at 10:55 PM
It's a full database, with an on-demand in-memory cache.
You shouldn't need to worry about flushing the cache for data consistency reasons. That's why the data is written to log files first (write-ahead logging).
But in case of a dirty shutdown, the next startup will be a bit slower because the database engine needs to replay the log files.
Shutting down cleanly will make the next startup a bit faster.

Nov 13, 2013 at 11:04 PM
Many thanks. That's excellent news! Everything seems to be way too easy!