Memory Storage on Mobile Devices #621
-
|
Hi everyone, i'm using axios-cache-interceptor to cache axios request on a React Native Expo app, i was wondering where the data are stored on the device (RAM?) and if there is a limit... anyway an explanation how this memory storage works on android and ios. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey @maioradv, memory storage just saves everything on a js variable, without any persistent storage or else. I guess its up to how many RAM the user's device have. And it will reset every time the user open/close the app. If you're running expo, However, if you're thinking about RAM usage/limit, probably you should use a persistent storage and save cache on the filesystem, but its up to your use case. |
Beta Was this translation helpful? Give feedback.
Hey @maioradv, memory storage just saves everything on a js variable, without any persistent storage or else. I guess its up to how many RAM the user's device have. And it will reset every time the user open/close the app.
If you're running expo,
Device.getMaxMemoryAsync()(androind only) orDevice.totalMemorywill get you the exact values of how many ram is available at runtime.However, if you're thinking about RAM usage/limit, probably you should use a persistent storage and save cache on the filesystem, but its up to your use case.