fetch() function does not auto-update, unless entire Redpoint server is restarted #3

Closed
opened 2026-08-19 00:07:01 +00:00 by Korbs · 1 comment
Owner

In most cases, when a page or component uses a fetch() function, it auto updates if the place it pulls from was also updated - such as an API endpoint or a general JSON response.

For example, this doesn't work:

const Posts = await fetch("https://example.org/api/posts").response((response) => response.json())

In the meantime, having the page or component auto-update the response with a setInterval() function will work:

let Posts = []

async function UpdatePostsCache() {
  try {
    const PostsResponse = await fetch("https://example.org/api/posts")
    Posts = await PostsResponse.json()
  } catch (error) {
    console.error("Failed to refresh posts: ", error)
  }
}

UpdatePostsCache()
setInterval(UpdatePostsCache, 300000) // Every 5 minutes
In most cases, when a page or component uses a `fetch()` function, it auto updates if the place it pulls from was also updated - such as an API endpoint or a general JSON response. For example, this doesn't work: ```typescript const Posts = await fetch("https://example.org/api/posts").response((response) => response.json()) ``` In the meantime, having the page or component auto-update the response with a `setInterval()` function will work: ```typescript let Posts = [] async function UpdatePostsCache() { try { const PostsResponse = await fetch("https://example.org/api/posts") Posts = await PostsResponse.json() } catch (error) { console.error("Failed to refresh posts: ", error) } } UpdatePostsCache() setInterval(UpdatePostsCache, 300000) // Every 5 minutes ```
Korbs self-assigned this 2026-08-19 00:07:01 +00:00
Author
Owner

This issue has been resolved in v1.2.0 of Redpoint, introducing a new Fetch() function that'll be put to use.

This issue has been resolved in v1.2.0 of Redpoint, introducing a new `Fetch()` function that'll be put to use.
Korbs locked as Resolved and limited conversation to collaborators 2026-08-28 17:14:22 +00:00
Korbs closed this issue 2026-08-28 17:34:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Redpoint/Redpoint#3
No description provided.