ensure generateCache method is not called when cache already exist