Redesign autonewline and processhandle cache behavior