[code cache] De-duplicate large double-keyed cache entries
- Changes very large code entry writing to create an indirection. The first entry is double-keyed just like other size entries. However, it contains response time, size, and a hashed checksum of the data. The checksum is used as a second key for another entry that contains a no header and the actual code. - Changes very large code entry fetches to do a double-keyed read as before. If there is a checksum in the header, that is used as a second key to read the actual code. - Every origin that loads a given resource for the first time will get a cache miss. To get a cache hit, the origin must first generate code and write it to the cache. The code is checksummed using SHA-256 to make it very unlikely for a malicious origin to store its code to the same key as another origin. Origins that generate identical code share the same code entry. Design Document: https://docs.google.com/document/d/1SCH15oCFJW55jsTJZ0T7XAQIZVryI_IJOIENyL_q4n4/edit Bug:chromium:936107 Change-Id: If99d2dada102382d51f97286fb3e5d9d2faf3aa6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846102 Commit-Queue: Bill Budge <bbudge@chromium.org> Reviewed-by:Mythri Alle <mythria@chromium.org> Reviewed-by:
Chris Palmer <palmer@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Maksim Orlovich <morlovich@chromium.org> Cr-Commit-Position: refs/heads/master@{#707389}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment