@azrico/global 1.3.32 → 1.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param key
|
|
10
10
|
* @param value
|
|
11
11
|
* @returns
|
|
12
|
-
*/function _get_session_cache(){return _get_session_cache=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){return _regeneratorRuntime().wrap(function d(c){for(;1;)switch(c.prev=c.next){case 0:return c.next=2,_get_cache(a,b,!0);case 2:return c.abrupt("return",c.sent);case 3:case"end":return c.stop()}},c)})),_get_session_cache.apply(this,arguments)}function set_session_cache(a,b){return _set_session_cache.apply(this,arguments)}function _set_session_cache(){return _set_session_cache=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){var d,e;return _regeneratorRuntime().wrap(function
|
|
12
|
+
*/function _get_session_cache(){return _get_session_cache=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){return _regeneratorRuntime().wrap(function d(c){for(;1;)switch(c.prev=c.next){case 0:return c.next=2,_get_cache(a,b,!0);case 2:return c.abrupt("return",c.sent);case 3:case"end":return c.stop()}},c)})),_get_session_cache.apply(this,arguments)}function set_session_cache(a,b){return _set_session_cache.apply(this,arguments)}function _set_session_cache(){return _set_session_cache=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function c(a,b){var d,e,f;return _regeneratorRuntime().wrap(function g(c){for(;1;)switch(c.prev=c.next){case 0:return d="undefined"!=typeof window,a=_core["default"].fixKey(a),e="".concat(sname,"-").concat(a),f=stringify_cacheValue(b),c.next=6,_index.gstorage.set_var(e,f,{storage:!0,session:d,json:!1});case 6:return c.abrupt("return",b);case 7:case"end":return c.stop()}},c)})),_set_session_cache.apply(this,arguments)}function delete_session_cache(a){return _delete_session_cache.apply(this,arguments)}function _delete_session_cache(){return _delete_session_cache=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){return _regeneratorRuntime().wrap(function c(b){for(;1;)switch(b.prev=b.next){case 0:return b.next=2,set_session_cache(a,void 0);case 2:return b.abrupt("return",b.sent);case 3:case"end":return b.stop()}},b)})),_delete_session_cache.apply(this,arguments)}function get_temp_cache_sync(a,b){a=_core["default"].fixKey(a);var c="temp-".concat(sname,"-").concat(a),d=_index.gstorage.get_var_sync(c);if(d)return d;return b?_index.gstorage.set_var_sync(c,b()):void 0}function get_temp_cache(a,b){return _get_temp_cache.apply(this,arguments)}/**
|
|
13
13
|
* make a loader that returns value of the cache
|
|
14
14
|
* @param key
|
|
15
15
|
* @param getterFunction
|