Skip to content

feat(fuse): add metadata cache to reduce filesystem lookups - #276

Merged
javi11 merged 1 commit into
mainfrom
feat/fuse-metadata-cache
Feb 5, 2026
Merged

feat(fuse): add metadata cache to reduce filesystem lookups#276
javi11 merged 1 commit into
mainfrom
feat/fuse-metadata-cache

Conversation

@javi11

@javi11 javi11 commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add application-level metadata caching for FUSE mount to reduce filesystem/metadata service queries
  • Implement LRU caches with TTL for stat results, directory listings, and negative lookups
  • Add cache invalidation integration with import service via FUSECacheNotifier interface
  • Add frontend UI for configuring metadata cache settings

Changes

  • New internal/fuse/cache/ package: Cache interface, LRU implementation, and tests
  • Config updates: Add metadata cache configuration options with sensible defaults
  • FUSE adapter integration: Cache checks in Getattr, Lookup, Readdir; invalidation on Rename
  • Import service integration: Cache invalidation after successful imports
  • Frontend UI: Metadata Cache Settings section in FUSE configuration page

Test plan

  • Unit tests for cache package (go test ./internal/fuse/cache/...)
  • Existing FUSE adapter tests pass (go test ./internal/fuse/...)
  • Frontend TypeScript compilation passes (bun run check)
  • Manual testing: Enable cache, verify UI controls work, test cache behavior

🤖 Generated with Claude Code

Add application-level caching for FUSE metadata operations to reduce
metadata service queries. The cache system includes:

- Stat cache: Caches file/directory metadata (size, mode, modtime)
- Directory cache: Caches directory listings
- Negative cache: Caches "file not found" results

Key implementation details:
- LRU eviction with configurable TTL for each cache type
- Cache invalidation on rename operations and via import service
- FUSECacheNotifier interface for import system integration
- Configurable via YAML config and frontend UI
- Memory budget ~2.2 MB for default configuration

Default settings:
- Stat cache: 10K entries, 30s TTL
- Dir cache: 1K entries, 60s TTL
- Negative cache: 5K entries, 10s TTL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@javi11
javi11 merged commit fe87bb3 into main Feb 5, 2026
1 check passed
@javi11
javi11 deleted the feat/fuse-metadata-cache branch February 26, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant