pub fn try_get_cached<'a, CTX, C, R, OnHit>(
    tcx: CTX,
    cache: &'a C,
    key: &C::Key,
    on_hit: OnHit
) -> Result<R, ()>where
    C: QueryCache,
    CTX: DepContext,
    OnHit: FnOnce(&C::Stored) -> R,
Expand description

Checks if the query is already computed and in the cache. It returns the shard index and a lock guard to the shard, which will be used if the query is not in the cache and we need to compute it.