MCPcopy Create free account
hub / github.com/apache/datafusion / get

Method get

datafusion/execution/src/cache/file_metadata_cache.rs:48–52  ·  view source on GitHub ↗

Returns the respective entry from the cache, if it exists. If the entry exists, it becomes the most recently used.

(&mut self, k: &Path)

Source from the content-addressed store, hash-verified

46 /// Returns the respective entry from the cache, if it exists.
47 /// If the entry exists, it becomes the most recently used.
48 fn get(&mut self, k: &Path) -> Option<CachedFileMetadataEntry> {
49 self.lru_queue.get(k).cloned().inspect(|_| {
50 *self.cache_hits.entry(k.clone()).or_insert(0) += 1;
51 })
52 }
53
54 /// Checks if the metadata is currently cached.
55 /// The LRU queue is not updated.

Calls 2

clonedMethod · 0.45
cloneMethod · 0.45