Should I use Phaser.Cache or window.localStorage?

I am using window.localStorage by habit, but, I see Phaser has Cache and it has method addData() which can be used to add custom data.

Any specific reason why should I use Phaser.Cache to store game data?
Or its just a matter of preffrence?

Phaser.Cache data lasts only while the Phaser.Game exists.

1 Like