Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toggles cached values #7082

Closed
wants to merge 2 commits into from
Closed

add toggles cached values #7082

wants to merge 2 commits into from

Conversation

jamesgorrie
Copy link
Contributor

@jamesgorrie jamesgorrie commented Sep 24, 2021

From #7079

Has a method, that's run on the entrypoint of the app, the fetches and stores data in webapp/.cache/{cacheKey}.

This makes the data available to client and server.

We can then create contexts, hooks etc that use that data, an example is with the toggles, which requires a cookie & querystring lookup to override user values ontop of defaults.

I thought of having it in webpack - but it would either be a hack or a lot of code overhead, and while we're using the app custom entry point, I thought we might as well use it.

Another reason is that there is talk of an API to do something similar, but saying that, there was talk of that when transpile modules was made.

This is a WIP and I can move all the toggle stuff out to use our current Toggle types if we like the general direction.

@jamesgorrie jamesgorrie requested review from jamieparkinson and a team and removed request for jamieparkinson September 24, 2021 15:47
Copy link
Contributor

@davidpmccormick davidpmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in.

@jamesgorrie jamesgorrie closed this Oct 5, 2021
@jamesgorrie jamesgorrie deleted the feat/cached branch October 5, 2021 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants