devour-js/devour-client

Congratulations and questions

frederikhors opened this issue · 2 comments

Hi guys. I would like to start a new JSONAPI project and Svelte 3 frontend.

I have seen that this AMAZING library can be used.

Questions

  1. Is there a minimum caching layer? I mean a normalized cache so as to update the same data in several places?

  2. Can I persist in the browser and retrieve the data from there to the startup?

tijn commented
  1. Is there a minimum caching layer? I mean a normalized cache so as to update the same data in several places?

I'm not sure what you're going for here. Do you need to send the same PATCH request to multiple backend servers?
As far as I know there is no caching layer in devour itself. It's simply reusing the browsers caching mechanism if you run it on your webpage.

  1. Can I persist in the browser and retrieve the data from there to the startup?

Devour is meant to make sending requests to remote servers easier though. It won't help you with this.

I guess what you actually want is a service worker that can persist your state. You can read more about that here: here (MDN) and here (also MDN). Google also has similar docs about this.

Thanks.