Finished preliminary caching thing, this time for realz. Still untested.