I am working on an add-on, and I have set up an option for it in the admincp. However I quickly noticed that these options don't seem to be cached. I have overloaded two model functions, and in each one I am grabbing this option I have set up. When I run the page, I see that my db queries has increased by 2, one for each of the option queries.
I figured that the options would be cached somewhere so it wouldn't use up a db query to grab it. Do you guys have any recommendations for how I can store this value so it doesn't need to query each time? Can I add it to a global registry or something the first time I grab it and then just check that in the future? What have you guys been doing? Maybe I'm just approaching this the wrong way.
I figured that the options would be cached somewhere so it wouldn't use up a db query to grab it. Do you guys have any recommendations for how I can store this value so it doesn't need to query each time? Can I add it to a global registry or something the first time I grab it and then just check that in the future? What have you guys been doing? Maybe I'm just approaching this the wrong way.