mysql query
#5

I think more people need to ****** what cache exactly is, and why they shouldn't spam database with unnecessary queries. Think - if someone wants to take your server down, all he has to do is spam some function which calls database over and over again.

What you have to do to prevent it?
1. Load data earlier and store it in some array
2. Update data periodically with some timer (for example every 5 minutes)
3. When someone asks about that data, give him answer from your cache, DO NOT send another query
Reply


Messages In This Thread
mysql query - by David94 - 19.03.2013, 14:17
Re: mysql query - by kamzaf - 19.03.2013, 19:34
Re: mysql query - by David94 - 20.03.2013, 15:01
Re: mysql query - by PaulDinam - 20.03.2013, 15:10
Re: mysql query - by Misiur - 20.03.2013, 15:16
Re: mysql query - by PaulDinam - 20.03.2013, 15:29
Re: mysql query - by Misiur - 20.03.2013, 15:30
Re: mysql query - by David94 - 29.03.2013, 15:59

Forum Jump:


Users browsing this thread: 2 Guest(s)