Page 1 of 1

Caching data from DB

Posted: Tue May 15, 2007 4:10 am
by will83
Hi there.

My site has a dropdown list populated with a list of approx 280 rows from a database.

To increase eprformance on page load times I would like to cache this list so that it is not calling from the database everytime.

Can anyone suggest a method for doing this?

Many thanks!

Will

Posted: Tue May 15, 2007 4:32 am
by CoderGoblin
A lot depends on how often the list changes. Can it change during the users "session" ?. If no then store in a session. Is the list the same for all users ? As part of any admin function which edits the options store the full list as a template file to be included. What performance overhead is actually caused and how often is the list created ? With a good select statement and a well designed database/server the impact shouldn't be that great if it is infrequent.