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 was archived by the owner on Jan 11, 2023. It is now read-only.
At present there's no way to set a cache header for a page. It might be useful to be able to do this:
exportdefault{asyncpreload({ params }){this.cache('max-age',30*60*1000);// cache for 30 minutesawaitthis.fetch(...).then(...);}};
(An interesting question that arises is whether that should change behaviour on the client as well. Should the browser cache the preloaded data for the specified duration and reuse it if the same URL is visited later? This would make some navigations faster but would increase memory usage and introduce a danger of mutation bugs, so perhaps it's better to rely on the service worker.)
Or would it be better to have a more generic this.headers({...}) function?