bitcoin/bitcoin — pull request #4684 by laanwj (2014-08-12 12:03:33+00:00)
Title: CCoinsViewCache: separate read and write caches

Keep track of entries that are read-only or r/w in separate caches. This is an optimization that avoids writing back all accessed entries back to the database on a flush.

Also makes the way clear for future optimizations such as putting a fixed limit on the size of the read cache, by using a different data structure for the read and write cache.