starkcoffee / randomchatroom

random comments. random context. randomness = madness!
http://the.randomchatroom.net
MIT License
4 stars 2 forks source link

using up CPU quota too quickly #1

Open starkcoffee opened 13 years ago

starkcoffee commented 13 years ago

due to too many requests for /messages .. there is an auto-refresh which naively grabs the full past 50 messages, even though there may not have been any new message in the last x seconds. need some kind of caching.

starkcoffee commented 13 years ago

first caching solution is implemented - respond with 304 (not modified) if there have been no messages. so the refresh now get the list of messages if there were no posts since the last time it asked for them