Share cache between games

I am using phaser 3 in combination with react components. Sometimes I need to load the same game 4 or 5 times in the dom.

Is there a way to make them use the same cache? When I load several, I can see the browser window freeze up while it parses some of the images I use for sprites.

Can I create a single CacheManager and pass it to multiple game instances somehow?

Or does anyone have an alternative suggestion?

try using localstorage of the browser.


Thanks for replying, I would love to use localstorage somehow,
Can you point me in the right direction to get started with that? I don’t see any documentation about backing the cache with local storage.

To follow up on this, I never figured out a way to reshare the cache between games. However, I did find a way to lazy load the images, so the game loads much faster now.