We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56905b3 commit dd0d609Copy full SHA for dd0d609
ui/src/utils/vm.js
@@ -29,18 +29,11 @@ export function isVmChildOf (childVm, parentVm) {
29
return false
30
}
31
32
-export function cache (vm, key, on) {
33
- if (isSSR === true) { return on }
+export function cache (vm, key, obj) {
+ if (isSSR === true) return obj
34
35
- const fullKey = key + '#' + Object.keys(on).join('#')
36
-
37
- if (vm.$__cacheOn === void 0) {
38
- vm.$__cacheOn = {}
39
- }
40
41
- if (vm.$__cacheOn[fullKey] === void 0) {
42
- vm.$__cacheOn[fullKey] = on
43
44
45
- return vm.$__cacheOn[fullKey]
+ const k = `__qcache_${key}`
+ return vm[k] === void 0
+ ? (vm[k] = obj)
+ : vm[k]
46
0 commit comments