Skip to content

Notes on types/traits used for in-memory query caching #136484

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Feb 3, 2025

When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.

When the word "cache" appears in the context of the query system, it often
isn't obvious whether that is referring to the in-memory query cache or the
on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 3, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense to me

/// for a given key (argument) type and value (return) type.
///
/// Types implementing this trait are associated with actual key/value types
/// by the `Cache` associated type of the `rustc_middle::query::Key` trait.
pub trait QueryCache: Sized {
Copy link
Member

@jieyouxu jieyouxu Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: I suppose this is actually InMemoryQueryCache?

@jieyouxu
Copy link
Member

jieyouxu commented Feb 3, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 3, 2025

📌 Commit 623d6e8 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 3, 2025
…ouxu

Notes on types/traits used for in-memory query caching

When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#136289 (OnceCell & OnceLock docs: Using (un)initialized consistently)
 - rust-lang#136299 (Ignore NLL boring locals in polonius diagnostics)
 - rust-lang#136411 (Omit argument names from function pointers that do not have argument names)
 - rust-lang#136430 (Use the type-level constant value `ty::Value` where needed)
 - rust-lang#136476 (Remove generic `//@ ignore-{wasm,wasm32,emscripten}` in tests)
 - rust-lang#136484 (Notes on types/traits used for in-memory query caching)
 - rust-lang#136493 (platform-support: document CPU baseline for x86-32 targets)
 - rust-lang#136498 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d6f94a6 into rust-lang:master Feb 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 4, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
Rollup merge of rust-lang#136484 - Zalathar:query-cache-notes, r=jieyouxu

Notes on types/traits used for in-memory query caching

When the word "cache" appears in the context of the query system, it often isn't obvious whether that is referring to the in-memory query cache or the on-disk incremental cache.

For these types, we can assure the reader that they are for in-memory caching.
@Zalathar Zalathar deleted the query-cache-notes branch February 4, 2025 07:01
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants