|
|
@ -13,7 +13,7 @@ export const Cache = { |
|
|
|
return Cache._getKeyPrefix() + (key || ""); |
|
|
|
return Cache._getKeyPrefix() + (key || ""); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getItem: function (key, opt = {}) { |
|
|
|
getItem: function (key, opt = {}) { |
|
|
|
const { defaultValue, typeConversion } = opt; |
|
|
|
const { defaultValue = null, typeConversion } = opt; |
|
|
|
const storageKey = Cache._generateKey(key); |
|
|
|
const storageKey = Cache._generateKey(key); |
|
|
|
let value = localStorage.getItem(storageKey); |
|
|
|
let value = localStorage.getItem(storageKey); |
|
|
|
|
|
|
|
|
|
|
|