Add generate_cache_for_all_grid_size.