logaretm / villus

🏎 A tiny and fast GraphQL client for Vue.js

Home Page:https://villus.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache persist on IndexedDB?

frederikhors opened this issue · comments

Hi, I'm new to Vue and to villus.

I'm trying to understand if there is a way to persist the cache in IndexedDB.

Is there an example already?

Thank you for your amazing work!

Hi, you could take a look at how cache plugin is implemented and swap the localstorage with indexed db calls.

Let me know if you need further guidance.

Perhaps the cache plugin should let you define your get and set methods to make the storage swappable.

I'm not using Vue yet, just wondering why we'll most likely start.

Anyway, I thought there was already some example and it would be nice to have it, but I think I'm not very good at writing code like this.