Skip to content

Commit 954389c

Browse files
authored
fuse: Don't expire directory entries in the kernel (#120)
Since AgentFS is the only writer to the SQLite-backed filesystem, the kernel can cache metadata and directory entries indefinitely. When the kernel initiates operations (create, unlink, rename, etc.), it already knows about the changes and updates its cache from our replies - no explicit invalidation is needed.
2 parents 3503134 + 5519614 commit 954389c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cli/src/fuse.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ use std::{
1717
};
1818
use tokio::runtime::Runtime;
1919

20-
const TTL: Duration = Duration::from_secs(1);
20+
/// Cache entries never expire - we explicitly invalidate on mutations.
21+
/// This is safe because we are the only writer to the filesystem.
22+
const TTL: Duration = Duration::MAX;
2123

2224
/// Options for mounting an agent filesystem via FUSE.
2325
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)