Promise Observable Cache

I am new to ionic and angular. And have the following question: I want to make a native app with data from a database. The data is not changing a lot.
What to use? Promise Observable? Do I have to do something with caching the data or is that standard.

Simplest thing is to create a provider, have the provider talk to the database and store the data, and have each of your pages get the data from the provider. So you repeatedly query the provider, but the provider only queries the database once.

Ok! Thx. Where to store the data? Localstorage?

Eh, it’s a lot of work to build your own cache. I’ve done it, but then decided to use Firestore, which automatically provides a caching service, so I removed my CacheManager provider from my app. Yay for learning experiences, I guess. You could just keep the data in the provider. The only reason to use Ionic Storage is to not have to query the database in between app restarts. But then you get into issues of cache coherence. So it’s simpler to query the database every time the app restarts, in which case you only need the provider.

I’ll give it a try. It is important that there is (old) data in the app when there is no internet connection.

Then use Ionic Storage with the SQLIte plugin.