Allow fetching multiple values from the cache at once

Add a simple API for fetching a list of entries from the cache, where
any missing entries are computed by a supplied block.