You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add --cache-min-size and --cache-max-size file size threshold options
Implementation:
- Add cache_min_size/cache_max_size (off_t) to Config struct, initialized to -1 (unlimited)
- Parse --cache-min-size and --cache-max-size CLI args with strtoll() validation
- Add min > max consistency check at argument parsing time
- In fs_open(): skip cache when file size falls outside thresholds using BYPASS_FH sentinel (uint64_t)-1
- In fs_read()/fs_release(): check for BYPASS_FH sentinel to bypass cache operations
- Fix zero-length file handling using Link struct content_length check
- Fix --insecure-tls typo in help text (licurl -> libcurl)
Tests:
- Unit tests: assert cache_min_size/cache_max_size init to -1 in test_Config_init
- Integration Test 7a: cache-min-size threshold (tiny.txt not cached, simple.txt cached)
- Integration Test 7b: cache-max-size threshold (tiny.txt cached, simple.txt not cached)
- Integration Test 7c: validation of negative, non-numeric, and min>max parameters
- Replace sleep 3 with proper mountpoint-wait loop in Test 7b
Documentation:
- Add USAGE.md sections for --cache-min-size and --cache-max-size
- Add raw help output section to USAGE.md
0 commit comments