I wanted to know what's the best way about going around my issue...
So, I want to have a live chart that is updating every second. I currently have a python script running on a raspberry pi that adds a new entry of data to a MySQL server every second. I'm working on a website that will nicely display this info using Ajax to refresh the data (I currently have Ajax pulling the only latest entry). I will have a 2 minute (120 seconds) line graph that will changes every second. Dropping the last second (second 120) and added a new entry to the timeline at second 1.
My question is, What's the best way to cache seconds 1-119 without having to make a MySQL query for the latest 120 entries every second. I figured caching it some way would be less data for the MySQL server to gather and push, and less network traffic for the Ajax to request.
Thanks for your replies, Throdne