Skip to content

Skip comment template digest on writes#137

Open
HamptonMakes wants to merge 1 commit into
mainfrom
hampton/comment-cache-digest
Open

Skip comment template digest on writes#137
HamptonMakes wants to merge 1 commit into
mainfrom
hampton/comment-cache-digest

Conversation

@HamptonMakes

Copy link
Copy Markdown
Collaborator

Why

Production comment writes intermittently take 400–900 ms because the synchronous broadcast computes a fragment template digest. Rails also misreads the partial's render once prose as a dependency on the nonexistent onces/once template.

What

  • Skip the template digest while retaining record-versioned comment body caching
  • Add an explicit cache namespace for intentional invalidation when Markdown rendering changes
  • Reword the ERB comment so Rails cannot infer a bogus render dependency
  • Add request coverage proving caching remains active without invoking the digestor

Risk Assessment

Low — comment HTML and broadcast behavior are unchanged. Existing cache entries are refreshed under the new namespace, and comment edits continue to invalidate via the record cache key.

References

Generated with Amp

@HamptonMakes HamptonMakes marked this pull request as ready for review July 14, 2026 18:48
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