Skip to content

localStorage cannot update multiple items at once #18

Description

@JamesDonnelly

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions