You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Currently, sapper will only cache one prefetched page at a time. That works fine and means we don't have to deal with memory growth, but consider the following scenario:
User hovers link to /a, /a's preloaded data gets saved
User hovers link to /b, /as preloaded data gets discarded and /b's replaces it
User navigates to /a, /a preloads again
User navigates to /b, /b preloads again
It's wasteful to prefetch a link just to throw it away and prefetch it again. I think we should consider a caching mechanism that allowed for multiple pages to be saved and for the invalidation to be configured per project.
A simple expiration in seconds with cleanup on navigation would already be better than what we currently have, imo. Thoughts?
ps. the current prefetching code will also use the latest preloaded page to figure out if it should preload a new one or not, making goto(currentPage) a noop if you haven't preloaded anything, but not a noop if you have.
The text was updated successfully, but these errors were encountered:
Currently, sapper will only cache one prefetched page at a time. That works fine and means we don't have to deal with memory growth, but consider the following scenario:
/a
,/a
's preloaded data gets saved/b
,/a
s preloaded data gets discarded and/b
's replaces it/a
,/a
preloads again/b
,/b
preloads againIt's wasteful to prefetch a link just to throw it away and prefetch it again. I think we should consider a caching mechanism that allowed for multiple pages to be saved and for the invalidation to be configured per project.
A simple expiration in seconds with cleanup on navigation would already be better than what we currently have, imo. Thoughts?
ps. the current prefetching code will also use the latest preloaded page to figure out if it should preload a new one or not, making
goto(currentPage)
a noop if you haven't preloaded anything, but not a noop if you have.The text was updated successfully, but these errors were encountered: