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

localStorage cannot update multiple items at once #18

Open
JamesDonnelly opened this issue May 29, 2018 · 0 comments
Open

localStorage cannot update multiple items at once #18

JamesDonnelly opened this issue May 29, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@JamesDonnelly
Copy link
Member

The cache busting helper makes the following calls:

    window.api.json('totals'),
    window.api.json('icons/achievements'),
    window.api.json('icons/minions'),
    window.api.json('icons/mounts'),
    window.api.json('icons/emotes'),
    window.api.json('friends'),
    window.api.json('supporters'),
    window.api.json('translators')

As these APIs respond so quickly, the localStorage mechanism used to cache the data on the client cannot update quick enough, and ultimately only one item is cached at a time.

  1. Clear localStorage.
  2. Reload page.
  3. Witness localStorage. -> totals.json cached, no others cached
  4. Reload page.
  5. Witness localStorage -> icons/achievements cached, totals already cached, no others cached.
  6. Etc.
@JamesDonnelly JamesDonnelly added the bug Something isn't working label May 29, 2018
@JamesDonnelly JamesDonnelly self-assigned this May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant