use putIfAbsent instead of get and put

use putIfAbsent instead of get and put. reduce no. of calls to mapdb
decreases latency.