RESOLVED FIXED 144251
[SOUP] Use xattrs to get/set the creation time of disk cache files
https://bugs.webkit.org/show_bug.cgi?id=144251
Summary [SOUP] Use xattrs to get/set the creation time of disk cache files
Carlos Garcia Campos
Reported 2015-04-27 01:16:39 PDT
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.
Attachments
Patch (4.45 KB, patch)
2015-04-27 01:20 PDT, Carlos Garcia Campos
mrobinson: review+
Carlos Garcia Campos
Comment 1 2015-04-27 01:20:04 PDT
Martin Robinson
Comment 2 2015-04-27 07:39:33 PDT
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.
Carlos Garcia Campos
Comment 3 2015-04-27 09:05:15 PDT
(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.
Carlos Garcia Campos
Comment 4 2015-04-28 23:19:53 PDT
Note You need to log in before you can comment on or make changes to this bug.