Crate rustysquid

Crate rustysquid 

Source

Modules§

connection_pool
memory

Structs§

CachedResponse
A cached HTTP response
ProxyCache
Thread-safe LRU cache for HTTP responses

Constants§

CACHE_SIZE
Maximum number of cache entries
CACHE_TTL
Default cache TTL in seconds (1 hour)
MAX_CACHE_BYTES
Maximum total size of all cached entries (50MB)
MAX_CONNECTIONS
Maximum number of concurrent connections
MAX_ENTRY_SIZE
Maximum size of a single cache entry (5MB)
MAX_REQUEST_SIZE
Maximum size of request headers (64KB)
MAX_RESPONSE_SIZE
Maximum size of a single response that can be cached (10MB)

Functions§

calculate_ttl
Calculate TTL from Cache-Control headers, defaults to CACHE_TTL
create_cache_key
Create a cache key from request parameters without allocation
extract_host
Extract host and port from HTTP headers
is_cacheable
Determine if a response should be cached based on method, path, and headers
parse_request
Parse an HTTP request, returns (method, path, headers) or None if invalid