added caching to infer_all_bursts
edge cases