<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1491992753374_2557">Hi,</div><div id="yui_3_16_0_ym19_1_1491992753374_2557"><br></div><div id="yui_3_16_0_ym19_1_1491992753374_2557">This may not be strictly Catalyst-related, but I'd be grateful for any help - I dont know much about</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">either caching or making things available throughout an app :-(</div><div id="yui_3_16_0_ym19_1_1491992753374_2557"><br></div><div id="yui_3_16_0_ym19_1_1491992753374_2557">I have an app that uses a number of different outside configuration files; which one it uses depends on</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">several factors, and it will be the same one per request cycle. Parsing each file is an expensive</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">calculation. Originally I read it at the beginning of the cycle and passed the resulting variable around,</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">but my models are now so complicated that this has gotten tedious, and I wanted to do something</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">like have a utility method MyApp::Utilities-&gt;get_outside_config($id) that any model can call when it</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">needs to. However, I dont want to have to recalculate it in every get_outside_config call.</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">Whats the best way of handling this? The config is used very often, and could be regarded as global,</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">but also most of my models are non-Catalyst ones that are glued in, so $c isnt available to them. The</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">config files dont change often.</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">Thanks.</div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1491992753374_2557" dir="ltr">Jen.</div></div></body></html>