How to Cache API Responses with Ionic & Capacitor

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 34

  • @behicsakar
    @behicsakar Рік тому

    bro thats mindblowing tut. full of observables subscribers and first time i see the browser 20min later you start to type and type and type…

  • @HurikaneTv
    @HurikaneTv 3 роки тому

    Proud Academy Member 😊😊😊😊

  • @RahulKumar-dm5zy
    @RahulKumar-dm5zy 3 роки тому +1

    awesome video sir. thanks for making this video

  • @SmartiePantsShop
    @SmartiePantsShop 3 роки тому +3

    Hi Simon, thanks for this, it was very very handy. But a quick question, between your examples over the last years, you've swapped between Capacitor Storage and Angular Storage and SQLite - is there a reason as to why I should use one over the other, are there any performance benefits or pitfalls I should be aware of. Thanks for the many many helpful videos.

    • @galaxies_dev
      @galaxies_dev  3 роки тому +2

      Either you have a virus on my Mac or I can predict the future - working on a video EXACTLY on that to clarify which to use in which situation!

  • @KrelfallahHichem
    @KrelfallahHichem 3 роки тому +1

    Excellent video, thank you

  • @cortesdepodcast8254
    @cortesdepodcast8254 3 роки тому +2

    Would be nice to compare capacitor 3 with cordova to know which one is faster, smaller and have less bugs.

    • @graphicsjay
      @graphicsjay 3 роки тому

      Anyone that's worked with Capacitor after working with Cordova knows its a much better experience. Every time i would open a cordova project (pre-Capacitor), I would have multiple issues to resolve before I could actually get to work. Capacitor hasn't been that way at all.

  • @farbod6450
    @farbod6450 3 роки тому

    This video is very helpful. Thank you

  • @user-fx4qq8ek2s
    @user-fx4qq8ek2s Рік тому

    sorry i am using ionic react capacitor, api php and phpmyadmin. nothing appear in my phpmyadmin

  • @iescape3372
    @iescape3372 3 роки тому

    Someone should make a channel like this, but for Vue & React. Having to watch these angular based tutorials, which by the way are great, is painful as I then have to figure out how to convert it to my preferred front end framework

    • @galaxies_dev
      @galaxies_dev  3 роки тому +2

      I totally agree. If I had started with all of this about a year ago, I'd have made it 100% about Vue or React as there's basically no content out there yet. But since almost all followers in here are interested in Angular, it's not really a good idea for me right now to create Vue/React content although I'd love to :/

    • @chizuru1999
      @chizuru1999 2 роки тому

      @@galaxies_dev do what you feel like. ☺️ Tho i would watch more angular for sure! 👍🏻

  • @Marshall86MT
    @Marshall86MT 3 роки тому +1

    very interesting video, as usual :) I use capacitor storage instead of the cordova plugin, what do you think?

    • @galaxies_dev
      @galaxies_dev  3 роки тому +3

      Sure would work as well, but I found managing it a bit more complicated then directly working with JSON data in Ionic Storage.

    • @Marshall86MT
      @Marshall86MT 3 роки тому +2

      @@galaxies_devIt's an honour to get your feedback 🙏🏾 yeah that's true but since I moved to capacitor I'm trying to use it as much as possible.

  • @vincenzodamico3054
    @vincenzodamico3054 3 роки тому +2

    💙💙💙💙 CACHIIIIIINNNN!!! 💙💙💙💙

  • @huriotech9048
    @huriotech9048 3 роки тому

    Does it also work for capacitor android applications or just the web ones? I tried several variants in the android app and it doesn't seem to work and the cause is that it is served on HTTP instead of HTTPS

  • @IRFANSYOUTUBE
    @IRFANSYOUTUBE 2 роки тому

    Hi, Working on Ionic Ecommerce Project, Looking for IONIC templates free/paid to sppedup the work. Please help

  • @kareemadel1649
    @kareemadel1649 2 роки тому

    can i do that with ionic-cordova app ??

  • @faqruddinmohammad1411
    @faqruddinmohammad1411 2 роки тому

    Hi Simon,
    Nice informative content. But how Can I update the cache storage if api is having updated data ? Having offline storage great for app to improve performance. But in realtime api data always have changes. So once there is changes in api data, Is any way to update the offline cached data ? So user can see always real data...
    Thank you

    • @galaxies_dev
      @galaxies_dev  2 роки тому +1

      You would have to come up with your own logic to handle the validation of your cache, so maybe expire it after some time or otherwise use a service worker with a specific caching strategy!

    • @faqruddinmohammad1411
      @faqruddinmohammad1411 2 роки тому

      @@galaxies_dev thanks simon. Can I have any example for service worker ?

  • @NoNdAs90
    @NoNdAs90 3 роки тому

    What's the difference to do all that to localStorage instead to that that you show ? Thank you for the video :)

    • @galaxies_dev
      @galaxies_dev  3 роки тому +2

      On a device, it will use SQLite because that data won't be cleared by the OS, which can happen if you simply store it inside localstorage.

    • @NoNdAs90
      @NoNdAs90 3 роки тому

      @@galaxies_dev could you explain it more because I do not the the point exactly? Thank you again for your answer 😁

  • @user-ms8ei9le7x
    @user-ms8ei9le7x 3 роки тому

    dinamics or statics .....
    caches.match( '/offline.html') 👍

    • @user-ms8ei9le7x
      @user-ms8ei9le7x 3 роки тому

      ua-cam.com/video/ifroMW_F4Sc/v-deo.html 👈

  • @TheSaceone
    @TheSaceone 3 роки тому +1

    Favourite day = Tuesday. No wonder why.

  • @DavideCampello
    @DavideCampello 3 роки тому +1

    the problems come when you need to create, update or delete the data

    • @victorm9131
      @victorm9131 3 роки тому +2

      Well in this case don’t use cache on those APIs. Caching mechanism makes sense for data that isn’t likely to be changed in a while like dictionaries / objects that have the same shape etc.

  • @jhonyxf
    @jhonyxf 3 роки тому

    how to solve this error?
    ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'addListener' of undefined
    TypeError: Cannot read property 'addListener' of undefined
    at new ApiService (api.service.ts:18)