Generate the replicates of a scenario, reusing them across methods
Source:R/generation_cache.R
generate_replicates.RdEquivalent to target_data$generate(n_replicates), with the
same result and the same random number generator state afterwards. When
cache_dir is given and generation is slow enough to be worth storing, the
replicates are written there, and a later call with the same target data,
replicate count and generator state reads them back instead.