Forum Moderators: coopster
Like I said, it's a very simple engine that keeps requesting this address throught AJAX every 10 seconds:
This script opens a MYSQL connection with a querry requesting the last 10 messages. Even if there isn't any new messages, the file returns all of them.
PROBLEM: my main problem here isn't about wasting bandwith in this proccess... the main problem is opening mysql connections every refresh.
Is there any easy solution to cache the return from the script without making any mysql connections?
My server lacks of a good mysql server (and sum this with my not optimizaded script), so I was wondering if I could make a cron job to save the return of this query in a HTML file and then point AJAX to read that file.
Is this possible? Can you guys just point me a direction to go?
[edited by: jatar_k at 1:40 pm (utc) on June 22, 2009]
[edit reason] no urls thanks [/edit]