fix error encoding cache refs #4876