Want to be able to client-side cache .pageContext.json
.
#1698
Unanswered
hato810424
asked this question in
Help & Questions
Replies: 1 comment 2 replies
-
Yes, by default, it‘s fetched every time upon page navigation. One thing you can try is to make the hook isomorphic so that Vike stops doing pageContext.json requests upon navigation. You‘ll then be able to use a cache on the client-side. One thing Vike could do to ease that use case is to support two variants of the same hook:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Wouldn't the fetch be performed "every time" on authentication pages and on pages where
+data.ts
is used, leading to server and database load depending on the functionality? We wondered.So I would like a mechanism to cache files such as
.pageContext.json
!Beta Was this translation helpful? Give feedback.
All reactions