Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pushkar Mishra <[email protected]>
  • Loading branch information
Pushkarm029 committed Nov 17, 2024
1 parent b056880 commit 8797e8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fs-cache/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod memory_limited_storage;
pub mod cache;
pub mod memory_limited_storage;
12 changes: 6 additions & 6 deletions fs-cache/src/memory_limited_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,18 @@ where
// let path = entry.path();
// if path.is_file() && path.extension().map_or(false, |ext| ext == "json") {
// let key = extract_key_from_file_path(&self.label, &path)?;

// // Only handle completely new keys
// if !self.memory_cache.contains_key(&key)
// && !self.disk_timestamps.contains_key(&key)
// if !self.memory_cache.contains_key(&key)
// && !self.disk_timestamps.contains_key(&key)
// && !self.deleted_keys.contains(&key) {

// if let Ok(metadata) = fs::metadata(&path) {
// if let Ok(modified) = metadata.modified() {
// // New key found - load it
// if let Ok(value) = self.load_value_from_disk(&key) {
// self.disk_timestamps.insert(key.clone(), modified);

// // Only add to memory if we have space or it's newer than oldest
// if self.memory_cache.len() < self.max_memory_items {
// self.add_to_memory_cache(key, value);
Expand All @@ -231,7 +231,7 @@ where
// }
// }
// }

self.deleted_keys.clear();
Ok(())
}
Expand Down

0 comments on commit 8797e8f

Please sign in to comment.