I had this playlist script for video player. Each time it was requested, it gather data from mysql and showed it. With requests every few minutes wasn't so bad until it became every few seconds.
MySQL process was literary jumping to 25% with each request. Each request returned about 500 rows
SO to the point. If I wanna have cached XML playlist file I would do something like.
That's it? Same as for template engine?
MySQL process was literary jumping to 25% with each request. Each request returned about 500 rows
SO to the point. If I wanna have cached XML playlist file I would do something like.
- Check if cache file exists and is not older than hour.
- If older then generate new
- If not old, open it and show it' contents