Enhance file metadata tracking and garbage collection logic
All checks were successful
Release Tag / release (push) Successful in 13s

- Added AccessCount field to FileInfo struct for improved tracking of file access frequency.
- Updated NewFileInfo and NewFileInfoFromOS functions to initialize AccessCount.
- Modified DiskFS and MemoryFS to preserve and increment AccessCount during file operations.
- Enhanced garbage collection methods (LRU, LFU, FIFO, Largest, Smallest, Hybrid) to utilize AccessCount for more effective space reclamation.
This commit is contained in:
2025-07-19 09:07:49 -05:00
parent 1187f05c77
commit 6919358eab
5 changed files with 92 additions and 65 deletions

8
.vscode/launch.json vendored
View File

@@ -23,8 +23,8 @@
"lru",
"--log-level",
"debug",
"--upstream",
"http://192.168.2.5:80",
// "--upstream",
// "http://192.168.2.5:80",
],
},
{
@@ -42,8 +42,8 @@
"hybrid",
"--log-level",
"debug",
"--upstream",
"http://192.168.2.5:80",
// "--upstream",
// "http://192.168.2.5:80",
],
},
{