Merged
Conversation
Adds a detailed plan for replacing the VFS byte-range cache with a segment-aligned cache keyed by Usenet message ID, covering architecture, new package layout, integration points, and migration strategy. https://claude.ai/code/session_01WojqqWwBwnUnYBFLyYxGwY
Adds a new `segcache` package that caches Usenet segments (keyed by message ID, ~750KB each) on disk, so each NNTP article is fetched at most once and reused across both FUSE and WebDAV access paths. Key components: - `segcache.SegmentCache`: disk-backed store with LRU eviction, atomic writes via temp-file+rename, and catalog.json persistence - `segcache.SegmentCachedFile`: implements both ReadAt (FUSE) and Read/Seek/Close/Stat/Readdir/Write (WebDAV) so it can be returned directly as a webdav.File - `segcache.Prefetcher`: detects sequential access (delta==1) and prefetches ahead; includes circuit breaker after 10 consecutive errors - `segcache.Manager`: lifecycle owner for cache, prefetchers, and per-path singleflight groups; background cleanup/catalog-flush loops - `NzbFilesystem.GetSegmentEntries`: new method that reads file metadata and returns []SegmentEntry with cumulative file offsets - `config.SegmentCacheConfig`: new top-level config section (enabled, cache_path, max_size_gb, expiry_hours, read_ahead_segments, prefetch_concurrency) Integration: - A single *segcache.Manager is created at app startup and shared between FUSE and WebDAV, enabling cross-protocol segment reuse - FUSE: segment cache branch runs before VFS cache in File.Open; Handle reads use ReadAt on SegmentCachedFile - WebDAV: fileSystem.OpenFile tries segment cache first, falling back to the original nzbFs.OpenFile path - SuppressStreamTrackingKey injected into opener context to prevent background segment fetches from creating duplicate activity streams Fixes singleflight return-value ordering (value, error, shared). https://claude.ai/code/session_01WojqqWwBwnUnYBFLyYxGwY
Updated the filesystem initialization to include segment cache management, enhancing performance for FUSE and WebDAV. The segment cache is now shared between both protocols, allowing for efficient reuse of cached Usenet segments. Additionally, removed the disk cache configuration from the UI components, streamlining the caching strategy for improved user experience and reducing complexity in the configuration settings.
- Changed logo image format from JPG to PNG for better quality. - Updated various static assets including favicons and touch icons to ensure consistency and improved visuals across platforms. - Minor adjustments to the homepage header for the new logo display.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a detailed plan for replacing the VFS byte-range cache with a
segment-aligned cache keyed by Usenet message ID, covering architecture,
new package layout, integration points, and migration strategy.
https://claude.ai/code/session_01WojqqWwBwnUnYBFLyYxGwY