Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Which problem does #14860 (the prerender cache in latest version) solve#14907

Unanswered
nevil2 asked this question inQ&A
Discussion options

There are two problems when deploying prerendered connect on Cloudflare Worker

  1. During Build. The same CMS API endpoints can be called multiple times during the build returning the same data. I have made an internal cache during build time to stop this.

  2. Run Time. Sometimes when user refreshes a page with the browser refresh button, the Cloudflare Worker, instead of just delivering the pre-render page, calls the CMS API. This can result in excessive API calls and large database egress. This cannot be solved with a server based cache, as Workers do not persist. I am using KV as the persistent cache. This is cleared a part of build process. However, it is not available for use during build process. So first time the Cloudflare Worker calls a prerendered API endpoint, it collects the data and puts it in the KV. Thereafter it collects data from KV.

Which problem does#14860 solve.

The first is easy to solve oneself, but would be better if SvelteKit did it automatically.

The second seems a design issue with SvelteKit. I do not understand the need to 'refresh' prerender data. In any case, there should be some way of disabling this behaviour.

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@nevil2

[8]ページ先頭

©2009-2025 Movatter.jp