{"action":"closed","issue":{"url":"https://api.github.com/repos/superwf/vuex-cache/issues/5","repository_url":"https://api.github.com/repos/superwf/vuex-cache","labels_url":"https://api.github.com/repos/superwf/vuex-cache/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/superwf/vuex-cache/issues/5/comments","events_url":"https://api.github.com/repos/superwf/vuex-cache/issues/5/events","html_url":"https://github.com/superwf/vuex-cache/issues/5","id":295497670,"number":5,"title":"Also cache requests with parameters","user":{"login":"eele94","id":8152346,"avatar_url":"https://avatars1.githubusercontent.com/u/8152346?v=4","gravatar_id":"","url":"https://api.github.com/users/eele94","html_url":"https://github.com/eele94","followers_url":"https://api.github.com/users/eele94/followers","following_url":"https://api.github.com/users/eele94/following{/other_user}","gists_url":"https://api.github.com/users/eele94/gists{/gist_id}","starred_url":"https://api.github.com/users/eele94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eele94/subscriptions","organizations_url":"https://api.github.com/users/eele94/orgs","repos_url":"https://api.github.com/users/eele94/repos","events_url":"https://api.github.com/users/eele94/events{/privacy}","received_events_url":"https://api.github.com/users/eele94/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-08T12:41:28Z","updated_at":"2018-02-20T14:30:55Z","closed_at":"2018-02-20T14:30:55Z","author_association":"NONE","body":"Hello I have a feature request for vuex-cache\r\n\r\nAn idea to cache also the requests with parameters?\r\n\r\n```\r\n'use strict';\r\n\r\nvar index = (function (store) {\r\n  store.cache = new Map();\r\n\r\n  store.cache.dispatch = function () {\r\n    var type = arguments[0];\r\n    if (arguments[1]) {\r\n      type = type + JSON.stringify(arguments[1]);\r\n    }\r\n    if (!store.cache.has(type)) {\r\n      store.cache.set(type, store.dispatch.apply(store, arguments));\r\n    }\r\n    return store.cache.get(type);\r\n  };\r\n});\r\n\r\nmodule.exports = index;\r\n\r\n```"}}
{"actor":{"display_login":"superwf"}}