Fixed bug where cache files weren't being used.

This should speed up startup time decently.
Merge origin/master