rework error cache mechanism