Welcome Guest, Not a member yet? Register   Sign In
What is the correct way to load data from a databse once for use everywhere?
#3

(02-11-2023, 08:32 AM)objecttothis Wrote: From what I can tell that will work, but unless I'm mistaken, every time config('foo')->bar gets called its going to call the constructor and pull all that data down from the database.  This defeats the purpose of trying to "load it into memory" once for use everywhere.

You are mistaken.
See https://codeigniter4.github.io/CodeIgnit...-factories
Reply


Messages In This Thread
RE: What is the correct way to load data from a databse once for use everywhere? - by kenjis - 02-11-2023, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB