try_get_cached in rustc_middle::query::inner - Rust
Description: Checks whether there is already a value for this key in the in-memory query cache, returning that value if present.

Skip to main content

## try_get_cached

# Function try_get_cached

Source

    fn try_get_cached<'tcx, C>(
        tcx: TyCtxt<'tcx>,
        cache: &C,
        key: C::Key,
    ) -> Option<C::Value>where
        C: QueryCache,

Expand description

Checks whether there is already a value for this key in the in-memory query cache, returning that value if present.

(Also performs some associated bookkeeping, if a value was found.)