directus / directus/rstore

Force `cache-only` after SSR

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
rstore
Dominant language
TypeScript
Stars
449
Forks
21
Avg merge
6d 22h
Merged PRs (30d)
2

Description

### Clear and concise description of the problem

After SSR hydration queries with some fetch policies such as `cache-and-fetch` or `fetch-only` will still make network requests.

### Suggested solution

Add a configurable delay after SSR hydration to force `cache-first` fetch policy on those queries.

### Alternative

_No response_

### Additional context

_No response_

### Validations

- [x] Follow our [Code of Conduct](https://github.com/Akryum/rstore/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [Contributing Guidelines](https://github.com/Akryum/rstore/blob/main/CONTRIBUTING.md).
- [x] Read the [docs](https://rstore.starpad.dev/guide/).
- [x] Check that there isn't [already an issue](https://github.com/Akryum/rstore/issues) that requests the same feature to avoid creating a duplicate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.