basho/riak_kv — pull request #699 by evanmcc (2013-10-10 22:44:43+00:00)
Title: Add metadata cache

NB: this patch has merged https://github.com/basho/riak_kv/pull/695 and should not be merged until after that patch has landed (and rebased if that patch changes).

This change adds an ETS table per vnode to act as a cache for the vclocks and index specs of any values that have recently been gotten or put. This is meant to save round-trips to the disk in common get-then-put workflows on slower disks.

The cache is size limited, and setting the size to 0 will disable it, since it is a slight performance hit in certain situations (e.g. using the memory backend, when all of your data fits into RAM, etc).