Fixed a couple of our cache bugs. Left to look at is why it segfaults when receiving reply data from server when it didn't before.