Hello to everyone who knows where to store the react query cache ?.Is it possible to decide for yourself where the react query should store the cache ?
react-query stores the cache in-memory. If you want to additionally sync the storage somewhere else, have a look at the persistQueryClient plugin.
Related
Right now i'm using Firebase Realtime Database, is there a way to see if i'm reading data from the Realtime Database or from cache ?(i want the same way like .isFromCache() from https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/SnapshotMetadata).
i read from other stackoverflow question Does Firebase cache the data?, that when i use once(), it clears the cache. is there any way to track where i'm reading the data ?
There is no way in the Realtime Database API calls or results to see whether a resulting snapshot came from the cache or from the server.
The isFromCache method from the Firestore API is not available on Realtime Database. It also doesn't necessarily do what you expect it to do, but that seems besides the point here.
I wanna create a chatapp for my friend, and now remote serve I will use firestore and locally sqlite, but I realized it is default for firestore to save data offline, so my question is I have some data like message, or sending setting for the app, is it ok just to save them in firestore offline which seems automatically and no extra costs.
It depends on what you want or need.
If you want to use the offline persistance only for storing in case internet is not there at all. Firebase supports that out of the box. But you need to keep in mind to do you calls carefully. Because on a slow internet connection, if you tell the Firebase access to wait for the online behavior. It will not be using the local first and you might not be able to show the data. Check the question here
Also if you want to use the offline persistance from Firebase, be mindful that the data size has a default of 40 megabytes of limit. You might assign that by your self. You can check this link
BUT, if you want to have heavy data manipulations and have more control over your data SQLite is more suggested.
My opionion: I think Firebase Offline persistance would be enough for you, so go for it.
I developed an application for Android with Ionic2 framework. I used Local storage functions to handle data.
Now, I want to replace local storage by database with some API calls.
And before switching to my API, I wish to extract the application data in order to no lost them.
Q1: That why, I wonder where is the path for the local storage data? In other words, where can I find the file with my stored data?
Q2: If retrieving my data isn't possible. I was wondering: If I modify the application with a extract function, when I reinstall it, will it delete my data or leave it as it is? (and so extract my data easily)
Thanks for your help!
I hope I gave enough information.
Local storage doc: https://ionicframework.com/docs/building/storage/
Which use localForage: https://github.com/localForage/localForage
First of all I'm new in ios/swift...
I need to have offline mode of my app.
I'm using Alamofire for all networking getting json, convert to objects and save into the DB (Core-Data). Wanted to know do I need to have additional cache in between (like: Haneke, or DataCache) in case no internet connection or getting from CoreData?
Is DB request fast/convenient enough?
CoreData is very fast (if correctly used). I don't believe it would be necessary to have an additional cache layer.
It would be just a duplication of data that you already have stored in your DB.
By the way all depends from your project use cases. I would not rely on temporary cached data if my app must work without internet connection.
To give you an idea of core data performances so that you can choose what works best for you: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreData/Performance.html
Im really confused when thinking about my requirement to store data locally for offline viewing.Now i have two options,DOM storage and HTML5 Local storage.
As im a complete newbiew in this particular topic,i need some help of SO Experts and Gurus.
Whats the Advantage and Dis-advantage of these two.?can any one compare these one.,so that i can understand deeply or give some reference links?
DOM Storage or Web Storage is the collective name given to the following types of client storage options available in HTML5. It includes:
localStorage
sessionStorage
Local storage is persistent meaning the stored data will still be there when you close and re-open the browser window.
Session storage is temporary and is available as long as the page session lasts.
There is really no comparison between the two since technically they both are the same.
Try to have a read here http://blog.sebarmeli.com/2010/11/22/understanding-webstorage/, you can easily understand the two objects, their methods, event attributes and their possible use.