Better caching system for Context3D