I may end up splitting this patch, as the MemoryCache is a bit tricky to get right.
Since the memory cache is a static singleton, simply setting it as disabled through its API is not foolproof because another context using the same WebProcess could un-disable and start filling the cache, altering execution results.
Simply returning 0 from CachedResourceLoader::requestResource whenever the associated page is in "replay mode" won't work because we expect the main resource to always be returned from requestResource.
An approach I am investigating now is to make a special SessionID for replay; when the MemoryCache encounters a resource in this session, it will neither return a cache hit nor store an fetched resource into the cache.
Created attachment 227861 [details]
I will commit this with just the page cache part, so other settings can hook into the common state setup method while I debug problems with the MemoryCache setting.
Committed r166337: <http://trac.webkit.org/changeset/166337>