[SOUP] Use xattrs to get/set the creation time of disk cache files
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2015 06:18:33 +0000 (06:18 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2015 06:18:33 +0000 (06:18 +0000)
commit11f31590a54e5bc757c83886ae296b6e3e3c4351
tree6a6d9f976dcd3d8609c9b277e9022334429905ef
parent9a2a56e342f83278ea585afbf311705989998e31
[SOUP] Use xattrs to get/set the creation time of disk cache files
https://bugs.webkit.org/show_bug.cgi?id=144251

Reviewed by Martin Robinson.

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.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp