Implement cache body reading and writing.