• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to reduce MongoDB connection

#1
[eluser]Unknown[/eluser]
Hello all,
I'm using a mongoDB library with Codeigniter.
I found that if I load the mongoDB library in model, it's one connection each loaded model.
Suppose that I have a page(controller method) that need to load data from 3 models. That means it's 3 mongoDB connections for that page.



How to reduce mongoDB connection to 1 connection per 1 controller method?

I think if I make model able to access library that has been loaded in controller, I will get 1 mongoDB connection per page. But how?

Thanks. ^___^


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.