FactoryInterface Articles

Make Module Configs Cacheable with the ZF2 Factory Interface

April 6, 2014

<p>For the longest time, I’ve been using closures in my Zend Framework 2 Modules <!-- raw HTML omitted -->Module<!-- raw HTML omitted --> class. I know they’re not always the best approach, but they’re not necessarily wrong either.</p> <p>But after <a href="http://www.masterzendframework.com/reviews/maximising-zend-framework-2-performance-phpuk14">reviewing Gary Hockin’s recent talk</a> at <!-- raw HTML omitted -->PHP<!-- raw HTML omitted --> Conference UK, I was reminded that outside of APC and OPCache, <strong>closures aren’t cacheable</strong>.</p>