alloc / saus

Vite SSR/SSG framework that aspires to be a layer for opinionated web frameworks to build upon
Other
38 stars 1 forks source link

Export `clearCache` helper #34

Open aleclarson opened 2 years ago

aleclarson commented 2 years ago

This clears the cache that defineStateModule loaders use.

You can call clearCache in the then callback of a renderer to ensure defineStateModule loaders are called on each render. Or you can pass a state module to it (along with any arguments) to clear a specific entry in the cache whenever you need.

aleclarson commented 2 years ago

This could probably work on the client side too