Code clean up for in memory cache.