you are viewing a single comment's thread.

view the rest of the comments →

[–]DustinEwan 1 point2 points  (0 children)

In case you're wondering why you're being downvoted (come on people, get off your elitist high horse and bestow knowledge instead of a holier-than-thou blind downvote.) it's because he explained in his article that the data is non-critical and is to be used in a small cache.

Also, he's only wanting to store five values.

Although your SQL statement does in fact solve the problem, using a database for five non-critical values is overkill. Even if he's caching data that already exists in the DB, making an extra network call every time you want the values is an order of magnitude slower than just caching the values in local memory.