CodeIgniter Forums
Alex Bilbie's MongoDB Library V2 : Want to cache query results. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Alex Bilbie's MongoDB Library V2 : Want to cache query results. (/thread-54291.html)



Alex Bilbie's MongoDB Library V2 : Want to cache query results. - El Forum - 09-01-2012

[eluser]sweetD[/eluser]
Hey Guys,

This is the first app, I will be building. I am going to be using a user's information throughout the app controllers and views. Looking to limit the amount of request but not sure what is the best method to do this. Thought about SESSIONS, also MemCache sounds like a good solution, but I'm afraid I have no idea how to use it. Since this is my first app, I'm not sure what would be the best way to optimize this aspect of my app.

Alex Bilbie's MongoDB Library V2


Alex Bilbie's MongoDB Library V2 : Want to cache query results. - El Forum - 09-20-2012

[eluser]jim-_-[/eluser]
Have you encountered any issues with performance yet?

I'm just wonder, since MongoDB seems to be VERY light on my system, compared to the MySQL I'm now converting from.


Alex Bilbie's MongoDB Library V2 : Want to cache query results. - El Forum - 09-20-2012

[eluser]sweetD[/eluser]
I actually didn't use the MemCache with calls to the MongoDB. The MongoDB returns were happening a lot faster than MemCache. I'm sure MemCache would work out best to return 1 item that many are trying to access. I'm not to great with caching patterns or theory, just yet. But doing a quick benchmark the MongoDB query was returning a lot faster. Then again I was using MemCachier and I'm using a third party MongoDB server not local.


Alex Bilbie's MongoDB Library V2 : Want to cache query results. - El Forum - 09-20-2012

[eluser]jim-_-[/eluser]
aha, my site is using Varnish at the time but I'm getting annoyed with it
(I'm not the person that set it up so I can't tweek it),
and I only need it once in a blue moon.


How are you benchmarking by the way?


Alex Bilbie's MongoDB Library V2 : Want to cache query results. - El Forum - 09-20-2012

[eluser]sweetD[/eluser]
Just used some of the methods described here; http://ellislab.com/codeigniter/user-guide/libraries/benchmark.html