net/disk_cache/sql: Store resource URL in CacheEntryKey [chromium/src : main]

0 views
Skip to first unread message

Tsuyoshi Horo (Gerrit)

unread,
Jun 16, 2026, 4:55:41 AMJun 16
to Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, gavin...@chromium.org, net-r...@chromium.org
Attention needed from Mingyu Lei

Tsuyoshi Horo added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Tsuyoshi Horo . resolved

leimy@

Could you please review this?

Open in Gerrit

Related details

Attention is currently required from:
  • Mingyu Lei
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
Gerrit-Change-Number: 7948459
Gerrit-PatchSet: 1
Gerrit-Owner: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Mingyu Lei <le...@chromium.org>
Gerrit-Comment-Date: Tue, 16 Jun 2026 08:55:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mingyu Lei (Gerrit)

unread,
Jun 18, 2026, 2:22:20 AM (12 days ago) Jun 18
to Tsuyoshi Horo, Chromium LUCI CQ, chromium...@chromium.org, gavin...@chromium.org, net-r...@chromium.org
Attention needed from Tsuyoshi Horo

Mingyu Lei voted and added 1 comment

Votes added by Mingyu Lei

Code-Review+1

1 comment

File net/disk_cache/sql/cache_entry_key.h
Line 62, Patchset 3 (Latest): const std::string resource_url;
Mingyu Lei . unresolved

this comes from the AI suggestion and I found it quite meaningful: The `resource_url` is part of the `key` so we actually store the duplicate string twice here. It would be an optimization to store the resource_url as an offset into the `key` string.

Open in Gerrit

Related details

Attention is currently required from:
  • Tsuyoshi Horo
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
    Gerrit-Change-Number: 7948459
    Gerrit-PatchSet: 3
    Gerrit-Owner: Tsuyoshi Horo <ho...@chromium.org>
    Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
    Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
    Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
    Gerrit-Comment-Date: Thu, 18 Jun 2026 06:21:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tsuyoshi Horo (Gerrit)

    unread,
    Jun 18, 2026, 2:35:21 AM (12 days ago) Jun 18
    to Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, gavin...@chromium.org, net-r...@chromium.org

    Tsuyoshi Horo voted and added 1 comment

    Votes added by Tsuyoshi Horo

    Commit-Queue+2

    1 comment

    File net/disk_cache/sql/cache_entry_key.h
    Line 62, Patchset 3 (Latest): const std::string resource_url;
    Mingyu Lei . resolved

    this comes from the AI suggestion and I found it quite meaningful: The `resource_url` is part of the `key` so we actually store the duplicate string twice here. It would be an optimization to store the resource_url as an offset into the `key` string.

    Tsuyoshi Horo

    Ah, good point. I will create another CL to do so as it requires changes in net/http/http_cache.h/cc.

    Temporary marking as resolved to land this.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
      Gerrit-Change-Number: 7948459
      Gerrit-PatchSet: 3
      Gerrit-Owner: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Comment-Date: Thu, 18 Jun 2026 06:34:48 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Mingyu Lei <le...@chromium.org>
      satisfied_requirement
      open
      diffy

      Tsuyoshi Horo (Gerrit)

      unread,
      Jun 18, 2026, 3:34:27 AM (12 days ago) Jun 18
      to Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, gavin...@chromium.org, net-r...@chromium.org

      Tsuyoshi Horo added 1 comment

      File net/disk_cache/sql/cache_entry_key.h
      Line 62, Patchset 3 (Latest): const std::string resource_url;
      Mingyu Lei . resolved

      this comes from the AI suggestion and I found it quite meaningful: The `resource_url` is part of the `key` so we actually store the duplicate string twice here. It would be an optimization to store the resource_url as an offset into the `key` string.

      Tsuyoshi Horo

      Ah, good point. I will create another CL to do so as it requires changes in net/http/http_cache.h/cc.

      Temporary marking as resolved to land this.

      Tsuyoshi Horo
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
      Gerrit-Change-Number: 7948459
      Gerrit-PatchSet: 3
      Gerrit-Owner: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Comment-Date: Thu, 18 Jun 2026 07:34:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Tsuyoshi Horo <ho...@chromium.org>
      Comment-In-Reply-To: Mingyu Lei <le...@chromium.org>
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jun 18, 2026, 3:57:49 AM (12 days ago) Jun 18
      to Tsuyoshi Horo, Mingyu Lei, chromium...@chromium.org, gavin...@chromium.org, net-r...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      net/disk_cache/sql: Store resource URL in CacheEntryKey

      Extend CacheEntryKey to extract and store the resource URL and its
      PersistentHash when the kRendererAccessibleHttpCache feature is enabled.

      Calling resource_url() or resource_url_hash() requires the feature to be
      enabled (enforced via CHECK). Also adds strong alias
      SqlSharedCacheUrlHash.
      Bug: 473666511
      Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
      Reviewed-by: Mingyu Lei <le...@chromium.org>
      Commit-Queue: Tsuyoshi Horo <ho...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1648850}
      Files:
      • M net/disk_cache/sql/cache_entry_key.cc
      • M net/disk_cache/sql/cache_entry_key.h
      • M net/disk_cache/sql/cache_entry_key_unittest.cc
      • M net/disk_cache/sql/sql_backend_aliases.h
      Change size: M
      Delta: 4 files changed, 113 insertions(+), 25 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Mingyu Lei
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ibac3c39af4436310eca09fc4e5bfe7b625659344
      Gerrit-Change-Number: 7948459
      Gerrit-PatchSet: 4
      Gerrit-Owner: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages