cache index in local storage