Added cache entry header reading and writing.