jozamudi
19e878800c
perf: keep-alive upstream sessions, TTL cache on upstream data, /stream LRU, cache hls.min.js
- shared thread-local curl_cffi sessions (no TLS handshake per call)
- in-memory TTL cache: search 5min, details/episodes/languages/
playlist-URLs 1h; api_stream retries once with a cold cache on 502
(recovers rotated playlist URLs)
- /stream LRU (24 entries) serves re-seeks and playlist re-fetches from memory
- hls.min.js: Cache-Control public max-age=30d (was no-store -> 500KB
re-download per page load on mobile)
Measured (click->play chain, cold -> warm):
search 0.45s -> 0.00s
detail 0.46s -> 0.00s
episodes 0.40s -> 0.00s
stream 1.06s -> 0.00s
m3u8 x2 0.64s -> 0.00s
segment 0.20s -> 0.00s