We have cache for sharding function: #85. Logically, we can also cache the sharding keys and get rid of get_metadata() finction.