Implement RichOutputStream.cached