Add more detailed diagnostic logging for measuring network cache efficacy. We want to know the reason the network cache is being by-passed, why the network cache decided not to cache a response and why it cannot reuse a cache entry. Radar: <rdar://problem/19632080>
Created attachment 246907 [details] Patch
Comment on attachment 246907 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=246907&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:202 > +static bool canRetrieve(const WebCore::ResourceRequest& request, CacheBypassReason& reason) Having both the bool return and the reason seems redundant. Why not just make this return a singe RetrieveDecision enum (or similar) that covers both the success and the failure cases? Same comment for canStore.
Comment on attachment 246907 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=246907&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.h:63 > +enum class CacheBypassReason { > + None, > + NotHTTPFamily, > + UnsupportedHTTPMethod, > + IsConditionalRequest, > + IsReloadIgnoringCacheData > +}; > + > +enum class CacheStorageFailure { > + None, > + NotHTTPFamily, > + UnsupportedHTTPMethod, > + IsAttachment, > + CacheControlNoStore, > + UncacheableHTTPStatusCode > +}; > + > +enum class CachedEntryReuseFailure { > + None, > + VaryingHeaderMismatch, > + MissingValidatorFields, > + Other, > +}; I think these should then move to NetworkCache scope.
Created attachment 246993 [details] Patch
Comment on attachment 246993 [details] Patch r=me
Comment on attachment 246993 [details] Patch Clearing flags on attachment: 246993 Committed r180456: <http://trac.webkit.org/changeset/180456>
All reviewed patches have been landed. Closing bug.