At work I'm dealing with a situation where we have a large amount of time series data and need to display sections of it to the user at a time. The data essentially has an infinite number of records, and so it's not possible for the client to load the entire dataset at once. However, the API call to request sections of data is slow/expensive, so I want to cache already-loaded data clientside and not have to re-request it.
An analogy would be when you watch a video online and skip forwards and backwards. The player downloads fragments of the video based on what the user is currently trying to watch and stores them in case the user watches that segment again.
There are a few differences between my use case and the video example though:
My data set is sparse. There may be regions of several weeks with no data points in them. I need to differentiate between "no data" and "not loaded".
My data set doesn't have discrete segments. In an HLS or DASH video the stream is split into segments (usually 10 seconds long) which provide discrete intervals where the loading should take place. My data can be loaded between any two points in time, and as the user can zoom in or out of the data the distance between these points may not even be the same.
My data set is unbounded. In a video, there's a clear start and end to the video. In my data set, you can go forwards and backwards theoretically infinitely. (Although in practice the length is limited by what dates can be stored in our backend, it's still a very large amount of time)
I'm self taught in programming and I don't know the name of this concept, but I feel there must be one. I'm capable of implementing what I need myself, but I'm hoping to avoid reinventing the wheel.