Skip to content

refactor: remove redundant mtime check from HTTP handlers#77

Merged
jfernandez merged 1 commit intomainfrom
refactor/remove-mtime-check-from-http-handlers
Mar 26, 2026
Merged

refactor: remove redundant mtime check from HTTP handlers#77
jfernandez merged 1 commit intomainfrom
refactor/remove-mtime-check-from-http-handlers

Conversation

@jfernandez
Copy link
Copy Markdown
Owner

Follows up on #76. HTTP handlers now serve from memory without re-reading from disk on every request. The file watcher is the sole mechanism for keeping content fresh.

  • Remove refresh_file (mtime-checking variant), rename force_refresh_file to refresh_file
  • Drop refresh_file calls from serve_html_root and serve_file

This aligns with the pre-rendered in-memory design: startup renders all files, the watcher updates on change, HTTP just serves what's in memory.

HTTP handlers now serve pre-rendered HTML from memory without
re-checking the file on disk. The file watcher is the sole mechanism
for keeping content fresh, which aligns with the pre-rendered in-memory
design.
@jfernandez jfernandez merged commit 68a07c7 into main Mar 26, 2026
9 checks passed
@jfernandez jfernandez deleted the refactor/remove-mtime-check-from-http-handlers branch March 26, 2026 23:10
adamatan pushed a commit to adamatan/mdserve that referenced this pull request Apr 2, 2026
)

HTTP handlers now serve pre-rendered HTML from memory without
re-checking the file on disk. The file watcher is the sole mechanism
for keeping content fresh, which aligns with the pre-rendered in-memory
design.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant