EvanDotPro/EdpSuperluminal — pull request #3 by weierophinney (2012-01-13 20:54:09+00:00)
Title: Feature/better autoloader handling

These commits achieve several things:

* 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.