Keyvaluestore cache

Mainly add header cache to KeyValueStore, in order to make header passed with shared_ptr, there exists many methods arguments needed to change.
https://www.sgi.com/tech/stl/HashedAssociativeContainer.html suggests that it may still be valid.