lolly/internal
xfy 148f43fcb3 perf(handler): enable file info cache and fix index file cache lookup
- Router now enables FileInfoCache with 2s TTL for all static handlers
  to reduce redundant os.Stat calls.
- FileInfoCache supports negative caching: missing files are cached
  with a shorter TTL to avoid repeated stat on non-existent paths.
- Fix missing fileCache lookup for directory index files (index.html).
  Previously handleStandard/handleTryFiles skipped fileCache when
  serving index files, causing os.ReadFile on every request even
  with file_cache configured.
- Extract tryServeFromFileCache() helper to unify cache hit logic
  across file and index-file serving paths.

Verified with wrk 200 conn / 20s on static /index.html:
- Throughput: 140k -> 242k req/sec (+73%)
- alloc_space: 2.6 GB -> 4.6 MB (-99.8%)
2026-06-11 14:43:04 +08:00
..
2026-06-09 15:59:36 +08:00
2026-06-09 15:59:36 +08:00
2026-06-09 15:59:36 +08:00
2026-06-03 16:36:23 +08:00