MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / new

Method new

graphlite/src/cache/mod.rs:55–66  ·  view source on GitHub ↗
(size_bytes: usize, level: CacheLevel)

Source from the content-addressed store, hash-verified

53
54impl CacheEntryMetadata {
55 pub fn new(size_bytes: usize, level: CacheLevel) -> Self {
56 let now = Instant::now();
57 Self {
58 created_at: now,
59 last_accessed: now,
60 access_count: 0,
61 size_bytes,
62 ttl: None,
63 level,
64 tags: Vec::new(),
65 }
66 }
67
68 pub fn with_ttl(mut self, ttl: Duration) -> Self {
69 self.ttl = Some(ttl);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected