RESOLVED FIXED 226083
Don't hang onto expired resources without validation headers in memory cache
https://bugs.webkit.org/show_bug.cgi?id=226083
Summary Don't hang onto expired resources without validation headers in memory cache
Antti Koivisto
Reported 2021-05-21 07:23:54 PDT
They use memory while only being useful for history navigation. Disk cache can handle that.
Attachments
patch (2.21 KB, patch)
2021-05-21 08:14 PDT, Antti Koivisto
no flags
patch (2.21 KB, patch)
2021-05-21 08:18 PDT, Antti Koivisto
ews-feeder: commit-queue-
patch (8.33 KB, patch)
2021-05-24 12:13 PDT, Antti Koivisto
ews-feeder: commit-queue-
patch (8.41 KB, patch)
2021-05-25 05:19 PDT, Antti Koivisto
no flags
patch (9.46 KB, patch)
2021-05-25 06:20 PDT, Antti Koivisto
no flags
patch (8.77 KB, patch)
2021-05-25 07:36 PDT, Antti Koivisto
ews-feeder: commit-queue-
patch (10.87 KB, patch)
2021-05-26 01:51 PDT, Antti Koivisto
no flags
patch (10.29 KB, patch)
2021-05-26 01:53 PDT, Antti Koivisto
no flags
patch (10.63 KB, patch)
2021-05-26 07:59 PDT, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2021-05-21 07:44:42 PDT
Antti Koivisto
Comment 2 2021-05-21 08:14:44 PDT
Antti Koivisto
Comment 3 2021-05-21 08:18:35 PDT
Antti Koivisto
Comment 4 2021-05-24 12:13:10 PDT
Antti Koivisto
Comment 5 2021-05-25 05:19:02 PDT
Antti Koivisto
Comment 6 2021-05-25 06:20:06 PDT
Antti Koivisto
Comment 7 2021-05-25 07:36:26 PDT
Antti Koivisto
Comment 8 2021-05-26 01:51:26 PDT
Antti Koivisto
Comment 9 2021-05-26 01:53:19 PDT
Antti Koivisto
Comment 10 2021-05-26 07:59:18 PDT
Chris Dumez
Comment 11 2021-05-26 11:09:49 PDT
Comment on attachment 429755 [details] patch r=me
Geoffrey Garen
Comment 12 2021-05-26 11:11:25 PDT
Comment on attachment 429755 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=429755&action=review > Source/WebCore/ChangeLog:29 > + Remove expired resources without validation headers from the cache if the resource is otherwise deletable. I guess this is the more conservative approach, so maybe it's best. But I wonder if there's any value to expired resources _with_ validation headers in the memory cache? In that case, we're going to do a network round trip to validate anyway, so maybe an IPC round trip to the network process is also fine. Long ago, Dave Hyatt told me that the real win of the memory cache was when it could respond synchronously in the current RunLoop iteration.
Antti Koivisto
Comment 13 2021-05-26 11:51:58 PDT
Reusing a resource from memory cache may also save decoding for images, parsing for stylesheets, text decoding etc. (though decoded versions are thrown out pretty fast anyway for unreferenced resources). But yeah, it might be time to throw out the entire revalidation logic in memory cache. Would certainly simplify things. Part of its job used to be to cover things networking layer wasn't handling well.
Geoffrey Garen
Comment 14 2021-05-26 12:14:06 PDT
> But yeah, it might be time to throw out the entire revalidation logic in > memory cache. Would certainly simplify things. Part of its job used to be to > cover things networking layer wasn't handling well. I guess that's a topic for another bug. But might be worth trying out at some point.
EWS
Comment 15 2021-05-26 12:19:36 PDT
Committed r278119 (238169@main): <https://commits.webkit.org/238169@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429755 [details].
Note You need to log in before you can comment on or make changes to this bug.