Skip to content

views: Add prevent-cache option to fix stale comment display#1110

Open
pkvach wants to merge 1 commit into
isso-comments:masterfrom
pkvach:feat/prevent-cache-headers
Open

views: Add prevent-cache option to fix stale comment display#1110
pkvach wants to merge 1 commit into
isso-comments:masterfrom
pkvach:feat/prevent-cache-headers

Conversation

@pkvach
Copy link
Copy Markdown
Contributor

@pkvach pkvach commented Apr 21, 2026

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

Add a prevent-cache config option (default: true) to set HTTP no-cache headers on dynamic JSON GET endpoints for comment listings and views. This prevents browsers and proxies from caching stale comment data, ensuring users always see the latest comments.

Fixes issue where new comments were missing from the UI unless the browser cache was disabled. The comment count was always correct, but displayed comments could be outdated due to caching.

Why is this necessary?

Fixes #939

@pkvach pkvach force-pushed the feat/prevent-cache-headers branch 4 times, most recently from 041acd2 to c4ed118 Compare April 21, 2026 22:17
Add a prevent-cache config option (default: true) to set HTTP no-cache headers on dynamic JSON GET endpoints for comment listings and views. This prevents browsers and proxies from caching stale comment data, ensuring users always see the latest comments.

Fixes isso-comments#939
@pkvach pkvach force-pushed the feat/prevent-cache-headers branch from c4ed118 to e265473 Compare May 1, 2026 21:50
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.

Missing comments (but count is correct!)

1 participant