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

Better Way To Manage Cache #953

Closed
wants to merge 16 commits into from
Closed

Better Way To Manage Cache #953

wants to merge 16 commits into from

Conversation

harshkhandeparkar
Copy link
Member

Fixes #[Add issue number here.]

What this does is that the cache button will be visible only when a new version is available.

  • The versions are added to the manifest.json file.
  • There are 2 versions, beta and normal version.
  • Beta version only works for beta.sequencer.publiclab.org and the other one for sequencer.publiclab.org
  • If the beta version is updated (it should be updated in each pr) and the code is pushed to the main website, the main website will not receive a notification for updating the file.
  • If the main version is bumped, the main site wilk get updates.
  • Initially both versions have been set to 3.0.0(no specific reason).
  • Versions can only be bumped.
  • This functionality doesn't work on localhost, on localhost or 127.0.0.1, the cache button will always be visible.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/is-reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@harshkhandeparkar
Copy link
Member Author

@jywarren @publiclab/is-reviewers

@jywarren
Copy link
Member

This is looking nice! Thank you for working to improve our caching -- which of these could we address in this way?

#910 #605

And also the idea of not having cache run at all in development locally? Thanks!!!

@harshkhandeparkar
Copy link
Member Author

Ok @jywarren. I will work on all the points in #605 which aren't checked. One thing is the binding the cache with the npm version. I'm not very about that. Currently I have tried to add the cache versions to the manifest file and there are two different cache versions, one for beta and one for the stable site. Is that good? Should the cache be changed?

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