Skip to content

Conversation

oskarrough
Copy link
Contributor

Not to be merged. Playing around with it.

@netlify
Copy link

netlify bot commented Jun 19, 2023

Deploy Preview for radio4000-components ready!

Name Link
🔨 Latest commit f59664d
🔍 Latest deploy log https://app.netlify.com/sites/radio4000-components/deploys/6491a518ccba990008d89af1
😎 Deploy Preview https://deploy-preview-89--radio4000-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@oskarrough oskarrough added the question Further information is requested label Jun 20, 2023
@oskarrough
Copy link
Contributor Author

The new Cache saves the results of queries in a map. It only sends a new request when 1) it's an unknown query 2) cache expired (by default 1 min). Access the cache on this.store.cache.

before

const {data, error} = await sdk.channels.readChannel(slug)

after

const {data, error} = await this.store.cache.get(`channel/${slug}`, () => sdk.channels.readChannel(slug))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: db-sdk-local-interop
Development

Successfully merging this pull request may close these issues.

1 participant