MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / resolve_class_fully_cached

Function resolve_class_fully_cached

src/virtual_members/mod.rs:673–679  ·  view source on GitHub ↗

Cached variant of [`resolve_class_fully`]. Identical semantics, but stores and retrieves results from `cache` so that repeated resolutions of the same class within a single request cycle (or across requests between edits) are free. The cache is keyed by the class's fully-qualified name (`namespace\ClassName` or just `ClassName` for the global namespace). Callers that apply post-resolution transf

(
    class: &ClassInfo,
    class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
    cache: &ResolvedClassCache,
)

Source from the content-addressed store, hash-verified

671/// still call this function for the base resolution and apply the
672/// transform to the returned value.
673pub fn resolve_class_fully_cached(
674 class: &ClassInfo,
675 class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
676 cache: &ResolvedClassCache,
677) -> Arc<ClassInfo> {
678 resolve_class_fully_inner(class, class_loader, Some(cache), &[])
679}
680
681/// Resolve a class fully, using the cache when available.
682///

Calls 1

Tested by

no test coverage detected