The event store to read from
The function to write the events to the cache
Optional
opts: { batchTime?: number; maxBatchSize?: number }The options for the process
Optional
batchTime?: numberThe time to wait before writing a batch (default: 5 seconds)
Optional
maxBatchSize?: numberThe maximum number of events to write in a batch
A function to stop the process
Setups a process to write batches of new events from an event store to a cache