The network process disk cache uses the creation time to compute a worth value used to determine the order in which cached resources are deleted when the cache is shrunk. In some operating systems like Linux there's no st_birthtime in struct stat, but since cache files are always created and deleted by us, we could use a custom xattr to store and retrieve the creation time of cached resources.
Created attachment 251727 [details] Patch
Comment on attachment 251727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251727&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:86 > +#if USE(SOUP) The correct guard here is probably #elif USE(SOUP) && OS(LINUX) unless g_file_query allows xattrs to work properly on Windows.
(In reply to comment #2) > Comment on attachment 251727 [details] > Patch Thanks for the review. > View in context: > https://bugs.webkit.org/attachment.cgi?id=251727&action=review > > > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:86 > > +#if USE(SOUP) > > The correct guard here is probably #elif USE(SOUP) && OS(LINUX) unless > g_file_query allows xattrs to work properly on Windows. This is in a file called NetworkCacheFileSystemPosix.h in WebKit2 subdir, so no windows support at all.
Committed r183532: <http://trac.webkit.org/changeset/183532>