Modified caching system to make development and release mode more consistent. Unstable.