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

Method remove

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

Removes an entry from the cache and returns it, if it exists.

(&mut self, k: &Path)

Source from the content-addressed store, hash-verified

103
104 /// Removes an entry from the cache and returns it, if it exists.
105 fn remove(&mut self, k: &Path) -> Option<CachedFileMetadataEntry> {
106 if let Some(old_entry) = self.lru_queue.remove(k) {
107 self.memory_used -= old_entry.file_metadata.memory_size();
108 self.cache_hits.remove(k);
109 Some(old_entry)
110 } else {
111 None
112 }
113 }
114
115 /// Returns the number of entries currently cached.
116 fn len(&self) -> usize {

Calls 1

memory_sizeMethod · 0.45