Skip to main content

insert

Function insert 

Source
pub fn insert(
    path: &Path,
    state: FileState,
    content: Arc<str>,
    admitted_by: &StoreAdmission,
)
Expand description

Insert (or replace) the content for path at version state. Skipped while the process is under memory pressure or when the cache is disabled, so the cache never adds to a memory problem.

content must be what admitted_by admitted: the cache only ever holds admitted text (Context Gateway, G5). Text admitted under a policy that is no longer the observed one is refused, so a build that outlived a policy change cannot repopulate the cache with it.