Skip to content

Conversation

@glsimon666
Copy link
Owner

This PR was created by qwen-chat coder for task 04764cc6-bc0c-46bd-8f67-0a1c7b09f040.

…Logic

- Modified `server/common/proxy.go` to set native proxy as default strategy and implement intelligent caching for large ISO files (>10GB)
- Added `handleLargeIsoFile` function to manage caching of first 32MB and last 5MB of large ISO files before serving requests
- Introduced `cacheIsoFileParts` to asynchronously download and cache critical file segments
- Implemented `IsoFileReader` with range-aware logic to serve cached data directly when available, otherwise fallback to remote source
- Added `IsoCacheState` and `sync.Map` to track and coordinate caching state across concurrent requests
- Enhanced `Proxy` function to detect large ISO files and route them through the new caching pipeline

The changes enable efficient handling of large ISO files by pre-caching critical portions, reducing latency for common access patterns while maintaining compatibility with existing proxy workflows. The implementation ensures thread-safe caching and seamless integration into the current streaming infrastructure.
@github-actions
Copy link

⚠️ PR 标题需以 feat(): , docs(): , fix(): , style(): , refactor(): , chore(): 其中之一开头,例如:feat(component): 新增功能
⚠️ The PR title must start with feat(): , docs(): , fix(): , style(): , or refactor(): , chore(): . For example: feat(component): add new feature.

如果跨多个组件,请使用主要组件作为前缀,并在标题中枚举、描述中说明。
If it spans multiple components, use the main component as the prefix and enumerate in the title, describe in the body.

Signed-off-by: glsimon666 <ambu.tr@gmail.com>
Signed-off-by: glsimon666 <ambu.tr@gmail.com>
Signed-off-by: glsimon666 <ambu.tr@gmail.com>
Signed-off-by: glsimon666 <ambu.tr@gmail.com>
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.

3 participants