[eluser]SpYk3[/eluser]
I'll try to explain this as simple as possible. The question, I'll prose at the end as the filler is important.
Let me first say, I've used CI for years and love it. If I'm ever doing anything in PHP, I see no reason not to use it and it's very expandable. So much so, I have an "Extension" to the "Load" class that allows for the following:
Code:
$this->load->master('pageBody');
As you might guys, this loads a header and footer automajically with whatever "view" I pull loaded in the <body>. It's a very handy feature. If you like the idea, I think I posted the code somewhere on here a long time ago, look around, it's really easy to do.
That being said, I also have 2 "backbone" modals that are of GREAT importance to the whole CRM (the "site" I manage for this company's Customer Service Reps). 1 Backbone is loaded on virtually every single page/widget (widget being smaller views of specific info loaded into one larger one). The second "backbone" is only loaded on specific views and "feeds" off of the first. The second one can never be "cached" as it may be updated at any moment, whereas the first simply pulls "customer links" (identities, since we don't make customers log in, we use things like past email provided on an order or phone number, etc...).
So I've looked into using Database Caching manually:
Code:
$this->db->cache_on(); $this->load->master('page'); $this->db->cache_off();
However, I can't tell if i'm using it correctly or if it is even making a difference? My natural assumption was that, the first "Backbone" piece would "cache" after it's first call (usually on header widget), and thus not hit Database during loading of following widgets on page. But as I stated, I'm not sure it quite functions as I expect and I really can't tell whether it's doing anything or not. Our "server" is currently undergoing a lot of changes and people are constantly hitting the DB with this "call", thus it's really hard for me to filter db logs to check.
Can someone help me better understand the caching class and how I might make better use of it in my situation?