Use much less memory when reading and writing cache