Files
steamcache2/.cursor/rules/steamcache2-overview.mdc
Justin Harms 3703e40442 Add comprehensive documentation for caching, configuration, development, and security patterns
- Introduced multiple new markdown files detailing caching patterns, configuration management, development workflows, Go language conventions, HTTP proxy patterns, logging and monitoring practices, performance optimization guidelines, project structure, security validation, and VFS architecture.
- Each document outlines best practices, patterns, and guidelines to enhance the understanding and implementation of various components within the SteamCache2 project.
- This documentation aims to improve maintainability, facilitate onboarding for new contributors, and ensure consistent application of coding and architectural standards across the codebase.
2025-09-22 17:29:26 -05:00

48 lines
2.1 KiB
Plaintext

---
alwaysApply: true
---
# SteamCache2 Overview
SteamCache2 is a high-performance HTTP proxy cache specifically designed for Steam game downloads. It reduces bandwidth usage and speeds up downloads by caching game files locally.
## Key Features
- **Tiered Caching**: Memory + disk cache with intelligent promotion
- **Service Detection**: Automatically detects Steam clients via User-Agent
- **Request Coalescing**: Multiple clients share downloads of the same file
- **Range Support**: Serves partial content from cached full files
- **Garbage Collection**: Multiple algorithms (LRU, LFU, FIFO, Hybrid, etc.)
- **Adaptive Caching**: Learns from access patterns for better performance
## Architecture
- **HTTP Proxy**: Intercepts Steam requests and serves from cache when possible
- **VFS Layer**: Abstracted storage supporting memory and disk caches
- **Service Manager**: Handles multiple gaming services (Steam, Epic, etc.)
- **GC System**: Intelligent cache eviction with configurable algorithms
## Development
- **Language**: Go 1.23+
- **Build**: Use `make` commands (see [Makefile](mdc:Makefile))
- **Testing**: Comprehensive unit and integration tests
- **Configuration**: YAML-based with automatic generation
## Performance
- **Concurrency**: Configurable request limits and rate limiting
- **Memory**: Dynamic memory management with configurable thresholds
- **Network**: Optimized HTTP transport with connection pooling
- **Storage**: Efficient cache file format with integrity verification
## Use Cases
- **Gaming Cafes**: Reduce bandwidth costs and improve download speeds
- **LAN Events**: Share game downloads across multiple clients
- **Home Networks**: Speed up game updates for multiple gamers
- **Development**: Test game downloads without hitting Steam servers
## Configuration
Default configuration is generated on first run. Key settings:
- Cache sizes (memory/disk)
- Garbage collection algorithms
- Concurrency limits
- Upstream server configuration
See [config.yaml](mdc:config.yaml) for configuration options and [README.md](mdc:README.md) for detailed setup instructions.