--- 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.