Rewrite cache library and resource provider