Welcome Guest, Not a member yet? Register   Sign In
How best to cache setting details
#1

[eluser]adamp1[/eluser]
I have my own settings module which is used to pull settings from a DB table and provide them for use throughout my projects. Now it has a cache option where on each load of the class it, loads EVERY setting into an array. Now this does mean if you use a setting twice on a page it saves an extra DB query. But I'm thinking this is a total waste since it still does a full load on every page.

I was wondering if I stored the values into a cache file, would it make it load faster?

Does anyone know if a DB query every page would be faster or slower than a file load?




Theme © iAndrew 2016 - Forum software by © MyBB