caching historical data