dwrite: Introduce cache to be used by shaping engines.