copy resourceCache when charlotte redefines itself