Store and retrieve host_id from/to cache