Fix crappy cache implementation by actually caching stuff