Add support for keying the cache by revision

This patch splits up the code paths between ddoc_cache and
ddoc_cache_opener a bit more clearly, keeping the gen_server
implementation details "mostly" in one place. The overloaded
open function has been replaced with more explicit function
names. I've left the old open to support old code during the
upgrade process but it should be removed after the next release.

The opener lookup keys are a bit mismatched from the LRU keys so
I've renamed those variables to make it clear when we're talking
about the openers rather than the cache itself. It could be
argued that the revision oblivious doc lookup could reuse the
result of any pending revision specific lookup on the same id
but it seems a bit too optimistic here so I've left them as
separate opener keys.
2 files changed
tree: 348b07d197fb91f4b7223f46cb83caa7a4f8dbad
  1. src/
  2. README.md
README.md

Design Doc Cache

Pretty much covers it.