add batch writes in cache.

In this PR, batch writes is added to the in memory cache as mentioned in #182
This is possible even in the case of InfluxDB. So :+1: for changing the interface.