title: Vuex: single load of several datasets
body: <p>In my Vue project, there are some references data, changing very rarely (payment methods, predefined service types etc.). I can load them conditionally</p>
  <pre><code>    async loadPaymentTypes({state, commit}) {
          if (state.payment_types.length === 0 ) {
              const data = await axios.get('/api/v1/payment-types');
              commit(setPaymentTypes, data.data);
          }
      },
  </code></pre>
  <p>but I hate to copypaste that code (and you see, it's a prototype, I have to add error handling to all actions).</p>
  <p>How can I make some good factory like</p>
  <pre><code>async loadPaymentTypes({state,commit}) {
      check_load(state.payment_types, '/api/v1/payment-types', 'setPaymentTypes')
  }
  </code></pre>
  <p>?</p>