Store product data in session variable or access db every time?

Posted by JakeTheSnake on Server Fault See other posts from Server Fault or by JakeTheSnake
Published on 2011-01-07T16:47:11Z Indexed on 2011/01/07 16:56 UTC
Read the original article Hit count: 167

I have my database storing lots of information about products (year, name, release_date, volume, etc. etc.). I currently load all of the products once and store them in a session variable - right now there's only 8 products but the list will grow as time progresses. The reason why I did this was to (perhaps foolishly) save HDD reads every time the products page was accessed. Am I shooting myself in the foot by storing this information in the session?

© Server Fault or respective owner

Related posts about database-performance

Related posts about sessions