add batch writes in cache.

In this PR, batch writes is added to the in memory cache as mentioned in #182
:+1: Do you want me to change it in this PR?