Adding global flush to memory cache class