Write BlockCache entries to KV store correctly.
TODO: Automated tests.