pub enum CacheEffect {
None,
Invalidate,
StoreFull(String),
}Expand description
A cache mutation that an edit needs after its disk I/O completes.
Decoupling the cache mutation from the I/O lets the MCP layer perform the (slow) file read/replace/write while holding only a cheap per-file lock, then touch the shared cache for a sub-millisecond instant — instead of holding the global cache write-lock across all disk I/O (the root cause of issue #320).
Variants§
None
No cache change required (e.g. the edit failed before writing).
Invalidate
The file on disk changed; drop the stale cache entry.
StoreFull(String)
Auto-escalation re-read full content that should be stored and marked as fully delivered.
Auto Trait Implementations§
impl Freeze for CacheEffect
impl RefUnwindSafe for CacheEffect
impl Send for CacheEffect
impl Sync for CacheEffect
impl Unpin for CacheEffect
impl UnsafeUnpin for CacheEffect
impl UnwindSafe for CacheEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more