fix initial cache memory allocation

Initial cache allocation fix:

So we are basically estimating and allocating the initial map size now as:
max(conf.Min_CACHE_SIZE, min(conf.Max_CACHE_SIZE, estimated_Map_Size));