Fix comments not loading: disable 24hr Cloudflare cache on comments endpoint
getComments was using createResponse default cacheDuration=86400 (24 hours). Cloudflare was serving a stale cached response, so comments appeared empty or outdated on every load. Set cacheDuration=0 (no-store) so each request hits the DB fresh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fe1245faf9
commit
e1b3c7600e
1 changed files with 1 additions and 1 deletions
|
|
@ -1718,7 +1718,7 @@ async function getComments(request, env) {
|
|||
});
|
||||
}
|
||||
|
||||
return createResponse(comments.results);
|
||||
return createResponse(comments.results, 200, 0);
|
||||
} catch (dbError) {
|
||||
return createResponse({
|
||||
error: 'Failed to retrieve comments',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue