This module caches the common Zend\* classes used by your application into a single cache file, reducing reliance on the autoloader. This greatly improves the performance of ZF2.
First, they omit autoloaders and the superluminal module from caching, which corrects some errors I was seeing.
Second, they munge DIR in cached file contents to resolve to the directory the original class file occurred in (fixes issues with retrieving module configuration and/or classmaps).
Third, the code now allows appending the cache, which means you can gradually build the cache over a number of requests.
Finally, the require_once for the cache file should now occur after the autoloader factory runs, in order to ensure that classes referenced by cached files but not cached themselves may be discovered. (edge case)
I've tested on a local copy of my site, and all is working correctly now. I'm only seeing ~10% gains, but even a 10% gain is worthwhile.
These commits achieve several things:
I've tested on a local copy of my site, and all is working correctly now. I'm only seeing ~10% gains, but even a 10% gain is worthwhile.