MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / has_ttl

Method has_ttl

nodedb/src/engine/kv/entry.rs:66–68  ·  view source on GitHub ↗

Whether this key has a TTL set (regardless of whether it has already expired). To check if a key is still accessible, use [`is_expired`](Self::is_expired).

(&self)

Source from the content-addressed store, hash-verified

64 ///
65 /// To check if a key is still accessible, use [`is_expired`](Self::is_expired).
66 pub fn has_ttl(&self) -> bool {
67 self.expire_at_ms != NO_EXPIRY
68 }
69
70 /// Whether this key is expired relative to the given wall-clock time.
71 pub fn is_expired(&self, now_ms: u64) -> bool {

Callers 1

get_entry_metaMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected