Search code examples
javascriptvuejs2vuetify.jsvuexvuex4

Does anyone know how to get around Vuex getters not having a cache


My front end will be connected to great backend later right now it is extremely difficult to test my codes because vuex getters and setters do not cache data. So every time I refresh my page all the functionalities and codes disappear. Does anyone know how I can cache my getters and setters in Vuex?


Solution

  • There are basically two options:

    1.) use the vuex-persistence plugin https://www.npmjs.com/package/vuex-persist

    2.) use local storage Vue.JS - how to use localStorage with Vue.JS