Skip to content

Caching not working for initial parallel requests #200

@emilbonnek

Description

@emilbonnek

Describe the bug
The caching doesn't seem to work when several requests get kicked off at once in a next js project.

To Reproduce

  1. Create a Next js page and inline an SVG there 2 places with cacheRequests={true} and onLoad={(src, hasCache) => console.log(src, hasCache)}
  2. Create another page and inline that same SVG 1 place
  3. start next dev server and open the first page and then navigate to the second and back to the first
  4. You will see the following logs:
my-svg false
my-svg false

Navigation to second page

my-svg true

Navigation to the first page

my-svg true
my-svg true

Expected behavior

my-svg false
my-svg true <- This one should cache

Navigation to second page

my-svg true

Navigation to the first page

my-svg true
my-svg true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions