RESOLVED FIXED 143200
Use st_mtime instead of st_atime to track file access time
https://bugs.webkit.org/show_bug.cgi?id=143200
Summary Use st_mtime instead of st_atime to track file access time
Antti Koivisto
Reported 2015-03-29 16:24:49 PDT
On OS X atime updates automatically so calling Storage::traverse() always ends up updating all access times. We update mtime manually on successful cache retrieve only.
Attachments
patch (5.60 KB, patch)
2015-03-29 16:34 PDT, Antti Koivisto
darin: review+
Antti Koivisto
Comment 1 2015-03-29 16:34:26 PDT
Darin Adler
Comment 2 2015-03-29 16:36:35 PDT
Comment on attachment 249701 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=249701&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:592 > + // Modificiation time is updated on read. Don't use access time since OS may update it automatically on any read. Typo: Modificiation Comment is unclear. When you say “is updated on read” you mean “is updated by WebKit cache code when it reads an item from the cache”, but it sounds like “is updated by the file system when any process reads the file”.
Antti Koivisto
Comment 3 2015-03-29 16:45:23 PDT
Andreas Kling
Comment 4 2015-03-30 10:54:41 PDT
Mild LOL at this bug. atime rarely does what anyone really wants :|
Antti Koivisto
Comment 5 2015-03-30 11:17:53 PDT
Wish there was at least a way to disable automatic atime updates for cache files. It is semantically nice.
Note You need to log in before you can comment on or make changes to this bug.