add index && layout to cache