I am consuming data via the states API for a certain region (in my case the world) about every 10-15 seconds. Then I ignore any data with incomplete information like missing position data or no callsign. This filtered data is put into a Redis database running in memory on my Raspberry Pi. To avoid the memory totally filled, you could use an expire attribute.
In my case I am storing which aircraft was flying on a certain day to download one day later the the flight path from the API (/flights/aircraft).
If you are a researcher and applied for access to the historical database, the traffic library created by Xavier Olive might also be helpful:
traffic