Update rates in place based on the events newer than the rolling window. No-ops when the cache is still fresh (now - rates.lastCalculated < cacheTimeoutMs).
rates
now - rates.lastCalculated < cacheTimeoutMs
Update
ratesin place based on the events newer than the rolling window. No-ops when the cache is still fresh (now - rates.lastCalculated < cacheTimeoutMs).