vike icon indicating copy to clipboard operation
vike copied to clipboard

+data caching

Open brillout opened this issue 1 year ago • 1 comments

Description

Use cases:

  • Avoid re-fetching the +data of layouts, see https://github.com/vikejs/vike/issues/1833#issuecomment-2324900026.
  • Avoid re-fetching global +data (e.g. pages/+data).
    • Upon client-side navigation.
    • Forever cache. (Similar to +onBoot but different: +data is called lazily upon rendering a page, whereas +onBoot is called eagerly upon starting the server/pre-rendering.)
  • More use cases?

brillout avatar Sep 02 '24 14:09 brillout

This would also be very useful for passing data to +Layout if at all possible, think Auth / Profile details for tools such as Firebase

itsezc avatar Feb 04 '25 23:02 itsezc

Closing in favor of:

  • https://github.com/vikejs/vike/issues/2566

brillout avatar Jul 20 '25 14:07 brillout