@anncic-api/cache 3.7.9 → 3.7.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x2aa2(_0xa3b281,_0x4644da){const _0x5a1ac4=a0_0x3223();return a0_0x2aa2=function(_0x5d50ec,_0x327ac3){_0x5d50ec=_0x5d50ec-0x76;let _0x32236c=_0x5a1ac4[_0x5d50ec];return _0x32236c;},a0_0x2aa2(_0xa3b281,_0x4644da);}const a0_0x241193=a0_0x2aa2;(function(_0x4e8dc7,_0x3d9500){const _0x1bcc22=a0_0x2aa2,_0x12b81b=_0x4e8dc7();while(!![]){try{const _0x15f5ca=-parseInt(_0x1bcc22(0x90))/0x1*(-parseInt(_0x1bcc22(0x79))/0x2)+-parseInt(_0x1bcc22(0x81))/0x3*(parseInt(_0x1bcc22(0x8f))/0x4)+parseInt(_0x1bcc22(0x76))/0x5*(-parseInt(_0x1bcc22(0x77))/0x6)+-parseInt(_0x1bcc22(0x78))/0x7*(-parseInt(_0x1bcc22(0x84))/0x8)+-parseInt(_0x1bcc22(0x89))/0x9+-parseInt(_0x1bcc22(0x7a))/0xa*(-parseInt(_0x1bcc22(0x87))/0xb)+-parseInt(_0x1bcc22(0x83))/0xc;if(_0x15f5ca===_0x3d9500)break;else _0x12b81b['push'](_0x12b81b['shift']());}catch(_0x21e2f2){_0x12b81b['push'](_0x12b81b['shift']());}}}(a0_0x3223,0xb78b7));function a0_0x3223(){const _0x219be6=['appDir','constructor','6813983IKfqRe','__esModule','13348521yknFoQ','search','defineProperty','/runtime/.cache','toString','default','2272GwxMrV','57822rEichy','5Scwzal','1869534IlIzVx','158795wdyGnO','50pQizTq','20eJBvZY','cache-manager-fs-hash','cache-manager-ioredis','apply','file','(((.+)+)+)+$','name','201jQcoSH','env','1742556cVDilw','16khCwhd'];a0_0x3223=function(){return _0x219be6;};return a0_0x3223();}const a0_0x327ac3=(function(){let _0x2dfe26=!![];return function(_0x141ec3,_0x256c7b){const _0x3e7d5c=_0x2dfe26?function(){const _0x3ea37d=a0_0x2aa2;if(_0x256c7b){const _0x2ce261=_0x256c7b[_0x3ea37d(0x7d)](_0x141ec3,arguments);return _0x256c7b=null,_0x2ce261;}}:function(){};return _0x2dfe26=![],_0x3e7d5c;};}()),a0_0x5d50ec=a0_0x327ac3(this,function(){const _0x11e438=a0_0x2aa2;return a0_0x5d50ec[_0x11e438(0x8d)]()[_0x11e438(0x8a)](_0x11e438(0x7f))[_0x11e438(0x8d)]()[_0x11e438(0x86)](a0_0x5d50ec)[_0x11e438(0x8a)]('(((.+)+)+)+$');});a0_0x5d50ec();'use strict';Object[a0_0x241193(0x8b)](exports,a0_0x241193(0x88),{'value':!![]});const fsStore=require(a0_0x241193(0x7b)),redisStore=require(a0_0x241193(0x7c));exports[a0_0x241193(0x8e)]=_0x3ff46b=>{const _0x3df7e4=a0_0x241193;return{'cache':{'default':_0x3df7e4(0x7e),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x3ff46b[_0x3df7e4(0x85)]+_0x3df7e4(0x8c)+((_0x3ff46b===null||_0x3ff46b===void 0x0?void 0x0:_0x3ff46b[_0x3df7e4(0x82)])?'-'+_0x3ff46b[_0x3df7e4(0x82)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','keyPrefix':_0x3ff46b[_0x3df7e4(0x80)]+':'+((_0x3ff46b===null||_0x3ff46b===void 0x0?void 0x0:_0x3ff46b[_0x3df7e4(0x82)])?_0x3ff46b['env']+':':'')}},'memory':{'store':'memory','options':{'max':0x64}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x1fb911=a1_0x4e6b;(function(_0x2b5d0a,_0xa8787d){var _0x16a38f=a1_0x4e6b,_0x28cced=_0x2b5d0a();while(!![]){try{var _0x25d88c=parseInt(_0x16a38f(0x1b1))/0x1*(-parseInt(_0x16a38f(0x1b4))/0x2)+-parseInt(_0x16a38f(0x1a0))/0x3+-parseInt(_0x16a38f(0x1aa))/0x4*(-parseInt(_0x16a38f(0x1b7))/0x5)+-parseInt(_0x16a38f(0x1a4))/0x6*(parseInt(_0x16a38f(0x1a1))/0x7)+parseInt(_0x16a38f(0x19f))/0x8+-parseInt(_0x16a38f(0x1ab))/0x9+parseInt(_0x16a38f(0x1a3))/0xa*(parseInt(_0x16a38f(0x19e))/0xb);if(_0x25d88c===_0xa8787d)break;else _0x28cced['push'](_0x28cced['shift']());}catch(_0x62a8d4){_0x28cced['push'](_0x28cced['shift']());}}}(a1_0x50c4,0x2cf39));var a1_0x4f9837=(function(){var _0x3471f4=!![];return function(_0xad5052,_0x855031){var _0x3128b4=_0x3471f4?function(){var _0x2020a9=a1_0x4e6b;if(_0x855031){var _0x269239=_0x855031[_0x2020a9(0x1a9)](_0xad5052,arguments);return _0x855031=null,_0x269239;}}:function(){};return _0x3471f4=![],_0x3128b4;};}()),a1_0x174a0e=a1_0x4f9837(this,function(){var _0x283548=a1_0x4e6b;return a1_0x174a0e[_0x283548(0x1a7)]()[_0x283548(0x1b0)]('(((.+)+)+)+$')[_0x283548(0x1a7)]()[_0x283548(0x1ad)](a1_0x174a0e)[_0x283548(0x1b0)](_0x283548(0x1b2));});a1_0x174a0e();function a1_0x4e6b(_0x25ea56,_0x341225){var _0x2cb437=a1_0x50c4();return a1_0x4e6b=function(_0x174a0e,_0x4f9837){_0x174a0e=_0x174a0e-0x19e;var _0x50c439=_0x2cb437[_0x174a0e];return _0x50c439;},a1_0x4e6b(_0x25ea56,_0x341225);}'use strict';var __decorate=this&&this[a1_0x1fb911(0x1b5)]||function(_0xe9debf,_0x5377d3,_0x3d99e0,_0x54d3d5){var _0x3047af=a1_0x1fb911,_0x65e0ed=arguments[_0x3047af(0x1b3)],_0x4b9cac=_0x65e0ed<0x3?_0x5377d3:_0x54d3d5===null?_0x54d3d5=Object[_0x3047af(0x1ac)](_0x5377d3,_0x3d99e0):_0x54d3d5,_0x15f264;if(typeof Reflect===_0x3047af(0x1a5)&&typeof Reflect[_0x3047af(0x1ae)]==='function')_0x4b9cac=Reflect[_0x3047af(0x1ae)](_0xe9debf,_0x5377d3,_0x3d99e0,_0x54d3d5);else{for(var _0x34373b=_0xe9debf[_0x3047af(0x1b3)]-0x1;_0x34373b>=0x0;_0x34373b--)if(_0x15f264=_0xe9debf[_0x34373b])_0x4b9cac=(_0x65e0ed<0x3?_0x15f264(_0x4b9cac):_0x65e0ed>0x3?_0x15f264(_0x5377d3,_0x3d99e0,_0x4b9cac):_0x15f264(_0x5377d3,_0x3d99e0))||_0x4b9cac;}return _0x65e0ed>0x3&&_0x4b9cac&&Object[_0x3047af(0x1af)](_0x5377d3,_0x3d99e0,_0x4b9cac),_0x4b9cac;};function a1_0x50c4(){var _0xa8d348=['26191WjTOIz','1488240Dtpprg','210735rwJbJs','14rHhbqG','CustomConfiguration','2110ksThto','984486waGuHh','object','__esModule','toString','@midwayjs/core','apply','892396RMekqx','2543265pBiuOn','getOwnPropertyDescriptor','constructor','decorate','defineProperty','search','499JDWiuS','(((.+)+)+)+$','length','186opxWlB','__decorate','./config/config.default','5CHoNJb'];a1_0x50c4=function(){return _0xa8d348;};return a1_0x50c4();}Object[a1_0x1fb911(0x1af)](exports,a1_0x1fb911(0x1a6),{'value':!![]}),exports[a1_0x1fb911(0x1a2)]=void 0x0;const core_1=require(a1_0x1fb911(0x1a8)),ConfigDefault=require(a1_0x1fb911(0x1b6));let CustomConfiguration=class CustomConfiguration{};exports['CustomConfiguration']=CustomConfiguration,exports[a1_0x1fb911(0x1a2)]=CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'conflictCheck':![],'namespace':'anncic-api:cache','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x21d0c2=a2_0x4302;(function(_0x1eb3b5,_0x468ae2){const _0x2d9959=a2_0x4302,_0x4a283b=_0x1eb3b5();while(!![]){try{const _0x3bc55f=parseInt(_0x2d9959(0x158))/0x1+-parseInt(_0x2d9959(0x15f))/0x2*(parseInt(_0x2d9959(0x159))/0x3)+-parseInt(_0x2d9959(0x173))/0x4+-parseInt(_0x2d9959(0x167))/0x5+-parseInt(_0x2d9959(0x15b))/0x6*(-parseInt(_0x2d9959(0x16d))/0x7)+parseInt(_0x2d9959(0x15d))/0x8*(-parseInt(_0x2d9959(0x16f))/0x9)+parseInt(_0x2d9959(0x157))/0xa*(parseInt(_0x2d9959(0x15e))/0xb);if(_0x3bc55f===_0x468ae2)break;else _0x4a283b['push'](_0x4a283b['shift']());}catch(_0x407de4){_0x4a283b['push'](_0x4a283b['shift']());}}}(a2_0x20ec,0x58f1d));const a2_0x347cf5=(function(){let _0x374885=!![];return function(_0x3593f5,_0x2e9c31){const _0x39c87b=_0x374885?function(){const _0x44dbff=a2_0x4302;if(_0x2e9c31){const _0xfb83a8=_0x2e9c31[_0x44dbff(0x169)](_0x3593f5,arguments);return _0x2e9c31=null,_0xfb83a8;}}:function(){};return _0x374885=![],_0x39c87b;};}()),a2_0xd7dc3b=a2_0x347cf5(this,function(){const _0x42bd83=a2_0x4302;return a2_0xd7dc3b[_0x42bd83(0x162)]()[_0x42bd83(0x15a)](_0x42bd83(0x170))[_0x42bd83(0x162)]()[_0x42bd83(0x160)](a2_0xd7dc3b)['search'](_0x42bd83(0x170));});a2_0xd7dc3b();'use strict';function a2_0x20ec(){const _0x994428=['stringify','parse','CacheService','107370UpyjGU','309890TAabbM','135HHrOqN','search','8094nosqDy','value','112ImAJOp','979ttXIdi','9422sbNnZA','constructor','defineProperty','toString','__esModule','use','../service/CacheService','set','1974400KqZHZM','app','apply','getAsync','crypto-js','Method::Decorator','217KfZjkP','MD5','150651maJdfA','(((.+)+)+)+$','getApplicationContext','REQUEST_OBJ_CTX_KEY','407056EpTUqB'];a2_0x20ec=function(){return _0x994428;};return a2_0x20ec();}Object[a2_0x21d0c2(0x161)](exports,a2_0x21d0c2(0x163),{'value':!![]}),exports['Cache']=Cache;function a2_0x4302(_0x451474,_0x304597){const _0x3285fd=a2_0x20ec();return a2_0x4302=function(_0xd7dc3b,_0x347cf5){_0xd7dc3b=_0xd7dc3b-0x157;let _0x20ec4b=_0x3285fd[_0xd7dc3b];return _0x20ec4b;},a2_0x4302(_0x451474,_0x304597);}const crypto_js_1=require(a2_0x21d0c2(0x16b)),CacheService_1=require(a2_0x21d0c2(0x165)),core_1=require('@midwayjs/core');function json_encode(_0x3d362c){const _0x12e203=a2_0x21d0c2;try{return JSON[_0x12e203(0x174)](_0x3d362c);}catch(_0x787a07){return undefined;}}function Cache(_0x9fbf90,_0xa44033){return(_0xc71e45,_0x6ee4b1,_0x5cc5af)=>{const _0x5c5940=a2_0x4302,_0x444b32=_0x5cc5af['value'];return _0x5cc5af[_0x5c5940(0x15c)]=async function(..._0x568af3){const _0x2e008d=_0x5c5940;_0x9fbf90=(_0x9fbf90?''+_0x9fbf90:''+(_0x6ee4b1||''))+'.'+(0x0,crypto_js_1[_0x2e008d(0x16e)])(json_encode(_0x568af3))['toString']();let _0x10da41=await this[core_1[_0x2e008d(0x172)]][_0x2e008d(0x168)][_0x2e008d(0x171)]()[_0x2e008d(0x16a)](CacheService_1[_0x2e008d(0x176)]),_0x453c32=await _0x10da41['use'](_0x2e008d(0x16c))['get'](_0x9fbf90);if(_0x453c32)return JSON[_0x2e008d(0x175)](_0x453c32);else _0x453c32=await _0x444b32[_0x2e008d(0x169)](this,[..._0x568af3]),await _0x10da41[_0x2e008d(0x164)](_0x2e008d(0x16c))[_0x2e008d(0x166)](_0x9fbf90,JSON[_0x2e008d(0x174)](_0x453c32),_0xa44033);return _0x453c32;},_0x5cc5af;};}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a3_0x37f1b3=a3_0x33cf;(function(_0x194988,_0x3d9689){var _0x135d12=a3_0x33cf,_0x1693aa=_0x194988();while(!![]){try{var _0x2af6cc=parseInt(_0x135d12(0x14b))/0x1*(-parseInt(_0x135d12(0x15d))/0x2)+-parseInt(_0x135d12(0x155))/0x3+-parseInt(_0x135d12(0x153))/0x4*(parseInt(_0x135d12(0x158))/0x5)+-parseInt(_0x135d12(0x15e))/0x6*(-parseInt(_0x135d12(0x15f))/0x7)+parseInt(_0x135d12(0x159))/0x8+parseInt(_0x135d12(0x14e))/0x9*(-parseInt(_0x135d12(0x15b))/0xa)+parseInt(_0x135d12(0x15c))/0xb;if(_0x2af6cc===_0x3d9689)break;else _0x1693aa['push'](_0x1693aa['shift']());}catch(_0x5837f7){_0x1693aa['push'](_0x1693aa['shift']());}}}(a3_0x38f1,0xcefe3));var a3_0x3baa35=(function(){var _0x1a0a3b=!![];return function(_0x30879d,_0x6f0685){var _0x59388e=_0x1a0a3b?function(){var _0x6faa6a=a3_0x33cf;if(_0x6f0685){var _0x1d02fa=_0x6f0685[_0x6faa6a(0x154)](_0x30879d,arguments);return _0x6f0685=null,_0x1d02fa;}}:function(){};return _0x1a0a3b=![],_0x59388e;};}()),a3_0x120a8f=a3_0x3baa35(this,function(){var _0x47bb10=a3_0x33cf;return a3_0x120a8f[_0x47bb10(0x14a)]()[_0x47bb10(0x152)](_0x47bb10(0x150))['toString']()[_0x47bb10(0x151)](a3_0x120a8f)[_0x47bb10(0x152)]('(((.+)+)+)+$');});a3_0x120a8f();'use strict';function a3_0x38f1(){var _0x59838a=['search','101120HQQfZL','apply','4673133idUOTb','./service/CacheService','__esModule','105smahNa','6892464HJxnJo','CustomConfiguration','7772660NutiCR','39506544hPkclw','4ujLmjb','120VmKZZr','186634nCvUrf','Cache','toString','636301LbrOIh','defineProperty','CacheService','9ylYqLl','./decorator/Cache','(((.+)+)+)+$','constructor'];a3_0x38f1=function(){return _0x59838a;};return a3_0x38f1();}Object['defineProperty'](exports,a3_0x37f1b3(0x157),{'value':!![]}),exports[a3_0x37f1b3(0x14d)]=exports[a3_0x37f1b3(0x149)]=exports['Configuration']=void 0x0;var configuration_1=require('./configuration');Object['defineProperty'](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x1ab6af=a3_0x37f1b3;return configuration_1[_0x1ab6af(0x15a)];}});var Cache_1=require(a3_0x37f1b3(0x14f));Object[a3_0x37f1b3(0x14c)](exports,a3_0x37f1b3(0x149),{'enumerable':!![],'get':function(){var _0x88bb66=a3_0x37f1b3;return Cache_1[_0x88bb66(0x149)];}});function a3_0x33cf(_0x45367b,_0xafec32){var _0x225467=a3_0x38f1();return a3_0x33cf=function(_0x120a8f,_0x3baa35){_0x120a8f=_0x120a8f-0x149;var _0x38f100=_0x225467[_0x120a8f];return _0x38f100;},a3_0x33cf(_0x45367b,_0xafec32);}var CacheService_1=require(a3_0x37f1b3(0x156));Object[a3_0x37f1b3(0x14c)](exports,a3_0x37f1b3(0x14d),{'enumerable':!![],'get':function(){var _0x4eed8c=a3_0x37f1b3;return CacheService_1[_0x4eed8c(0x14d)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a4_0x2d3b(_0x24e8ea,_0x21a303){var _0x3fa4a3=a4_0x33d0();return a4_0x2d3b=function(_0x433989,_0x700772){_0x433989=_0x433989-0x1e9;var _0x33d08e=_0x3fa4a3[_0x433989];return _0x33d08e;},a4_0x2d3b(_0x24e8ea,_0x21a303);}var a4_0xf09eeb=a4_0x2d3b;function a4_0x33d0(){var _0x2fa8e8=['stringify','parse','defineProperty','prefix','function','metadata','__esModule','store','map','cache-manager','object','5MRVbsz','config','getClient','prototype','stores','use','list','8091855ZXizHj','set','clients','@midwayjs/core','254864uBIERd','has','Provide','json_decode','203635EPTWiW','1789740kDDtKg','lrange','caching','default','search','(((.+)+)+)+$','redis','__decorate','lpop','120424WZrfvr','options','Singleton','210968dWQJvk','del','toString','decorate','CacheService','design:type','hset','undefined','apply','getOwnPropertyDescriptor','cache','7XYKKFv','file','get','reset','Cache','1186332JoHVwG'];a4_0x33d0=function(){return _0x2fa8e8;};return a4_0x33d0();}(function(_0x3e1396,_0x3c30f0){var _0x32d4c2=a4_0x2d3b,_0x5f532e=_0x3e1396();while(!![]){try{var _0x16e941=parseInt(_0x32d4c2(0x1f6))/0x1+-parseInt(_0x32d4c2(0x203))/0x2+-parseInt(_0x32d4c2(0x213))/0x3+parseInt(_0x32d4c2(0x1f2))/0x4*(-parseInt(_0x32d4c2(0x21f))/0x5)+-parseInt(_0x32d4c2(0x1f7))/0x6+-parseInt(_0x32d4c2(0x20e))/0x7*(parseInt(_0x32d4c2(0x200))/0x8)+parseInt(_0x32d4c2(0x1ee))/0x9;if(_0x16e941===_0x3c30f0)break;else _0x5f532e['push'](_0x5f532e['shift']());}catch(_0x3e3c2a){_0x5f532e['push'](_0x5f532e['shift']());}}}(a4_0x33d0,0x36de7));var a4_0x700772=(function(){var _0x142a95=!![];return function(_0x30d4b2,_0x519add){var _0x14e6e1=_0x142a95?function(){var _0x370054=a4_0x2d3b;if(_0x519add){var _0x35f3dc=_0x519add[_0x370054(0x20b)](_0x30d4b2,arguments);return _0x519add=null,_0x35f3dc;}}:function(){};return _0x142a95=![],_0x14e6e1;};}()),a4_0x433989=a4_0x700772(this,function(){var _0x54880c=a4_0x2d3b;return a4_0x433989[_0x54880c(0x205)]()['search'](_0x54880c(0x1fc))[_0x54880c(0x205)]()['constructor'](a4_0x433989)[_0x54880c(0x1fb)]('(((.+)+)+)+$');});a4_0x433989();'use strict';var __decorate=this&&this[a4_0xf09eeb(0x1fe)]||function(_0x279d11,_0x4d22cf,_0x7be59d,_0x543e0b){var _0x22709e=a4_0xf09eeb,_0x1071da=arguments['length'],_0x37bfd3=_0x1071da<0x3?_0x4d22cf:_0x543e0b===null?_0x543e0b=Object[_0x22709e(0x20c)](_0x4d22cf,_0x7be59d):_0x543e0b,_0x2aa28f;if(typeof Reflect===_0x22709e(0x21e)&&typeof Reflect[_0x22709e(0x206)]===_0x22709e(0x218))_0x37bfd3=Reflect[_0x22709e(0x206)](_0x279d11,_0x4d22cf,_0x7be59d,_0x543e0b);else{for(var _0x4bf7f1=_0x279d11['length']-0x1;_0x4bf7f1>=0x0;_0x4bf7f1--)if(_0x2aa28f=_0x279d11[_0x4bf7f1])_0x37bfd3=(_0x1071da<0x3?_0x2aa28f(_0x37bfd3):_0x1071da>0x3?_0x2aa28f(_0x4d22cf,_0x7be59d,_0x37bfd3):_0x2aa28f(_0x4d22cf,_0x7be59d))||_0x37bfd3;}return _0x1071da>0x3&&_0x37bfd3&&Object['defineProperty'](_0x4d22cf,_0x7be59d,_0x37bfd3),_0x37bfd3;},__metadata=this&&this['__metadata']||function(_0x1c2807,_0x2ac305){var _0x351968=a4_0xf09eeb;if(typeof Reflect===_0x351968(0x21e)&&typeof Reflect['metadata']===_0x351968(0x218))return Reflect[_0x351968(0x219)](_0x1c2807,_0x2ac305);};Object[a4_0xf09eeb(0x216)](exports,a4_0xf09eeb(0x21a),{'value':!![]}),exports[a4_0xf09eeb(0x212)]=exports[a4_0xf09eeb(0x207)]=void 0x0,exports['json_encode']=json_encode,exports[a4_0xf09eeb(0x1f5)]=json_decode;const cacheManager=require(a4_0xf09eeb(0x21d)),core_1=require(a4_0xf09eeb(0x1f1));let CacheService=class CacheService{constructor(){var _0xbfd648=a4_0xf09eeb;this[_0xbfd648(0x20d)]=undefined,this['clients']=new Map();}[a4_0xf09eeb(0x1ec)](_0x2fa663){var _0x4e6d3b=a4_0xf09eeb,_0x20d602,_0x1a96a1;if(!this['cache']){const _0x2543f8=((_0x20d602=this['config'][_0x4e6d3b(0x1eb)])===null||_0x20d602===void 0x0?void 0x0:_0x20d602[(_0x1a96a1=this[_0x4e6d3b(0x220)])===null||_0x1a96a1===void 0x0?void 0x0:_0x1a96a1[_0x4e6d3b(0x1fa)]])||this[_0x4e6d3b(0x220)]['stores'][_0x4e6d3b(0x20f)];this[_0x4e6d3b(0x20d)]=cacheManager[_0x4e6d3b(0x1f9)]({..._0x2543f8[_0x4e6d3b(0x201)],'store':_0x2543f8[_0x4e6d3b(0x21b)]});}return!this['clients'][_0x4e6d3b(0x1f3)](_0x2fa663)&&this[_0x4e6d3b(0x1f0)][_0x4e6d3b(0x1ef)](_0x2fa663,new Cache(_0x2fa663,this[_0x4e6d3b(0x20d)])),this[_0x4e6d3b(0x1f0)][_0x4e6d3b(0x210)](_0x2fa663);}async[a4_0xf09eeb(0x211)](){var _0x37b328=a4_0xf09eeb;return await this[_0x37b328(0x20d)][_0x37b328(0x211)]();}};exports[a4_0xf09eeb(0x207)]=CacheService,__decorate([(0x0,core_1['Config'])('cache'),__metadata(a4_0xf09eeb(0x208),Object)],CacheService[a4_0xf09eeb(0x1ea)],a4_0xf09eeb(0x220),void 0x0),exports['CacheService']=CacheService=__decorate([(0x0,core_1[a4_0xf09eeb(0x1f4)])(),(0x0,core_1['Scope'])(core_1['ScopeEnum'][a4_0xf09eeb(0x202)])],CacheService);class Cache{constructor(_0x370c12,_0x19768b){var _0x1f0fe7=a4_0xf09eeb;this[_0x1f0fe7(0x20d)]=_0x19768b,this[_0x1f0fe7(0x217)]=_0x370c12;}async[a4_0xf09eeb(0x204)](_0x3c5a66){var _0x18481b=a4_0xf09eeb;return await this['cache'][_0x18481b(0x204)](this[_0x18481b(0x217)]+':'+_0x3c5a66);}async[a4_0xf09eeb(0x1ef)](_0x3316f1,_0x488c75,_0x569fd8){var _0x2e316c=a4_0xf09eeb,_0x4abdb4,_0x157d73;return((_0x157d73=(_0x4abdb4=this[_0x2e316c(0x20d)])===null||_0x4abdb4===void 0x0?void 0x0:_0x4abdb4[_0x2e316c(0x21b)])===null||_0x157d73===void 0x0?void 0x0:_0x157d73['name'])==_0x2e316c(0x1fd)?await this[_0x2e316c(0x20d)]['set'](this['prefix']+':'+_0x3316f1,_0x488c75,{'ttl':_0x569fd8}):await this[_0x2e316c(0x20d)][_0x2e316c(0x1ef)](this[_0x2e316c(0x217)]+':'+_0x3316f1,_0x488c75,{'ttl':_0x569fd8});}async[a4_0xf09eeb(0x210)](_0x1e853f,_0x44904f,_0x4fcc80){return new Promise((_0x561b6b,_0x284342)=>{var _0xa7373e=a4_0x2d3b;this[_0xa7373e(0x20d)][_0xa7373e(0x210)](this[_0xa7373e(0x217)]+':'+_0x1e853f,async(_0x107078,_0x14fffc)=>{var _0xb892ab=_0xa7373e;_0x107078?_0x284342(_0x107078):((_0x14fffc===undefined||_0x14fffc===null)&&(typeof _0x44904f=='function'?(_0x14fffc=await _0x44904f()['catch'](_0x25cc82=>_0x284342(_0x25cc82)),typeof _0x14fffc!=_0xb892ab(0x20a)&&await this['set'](_0x1e853f,_0x14fffc,_0x4fcc80)):_0x14fffc=_0x44904f),_0x561b6b(_0x14fffc));});});}async['hdel'](_0x52ace4,_0x2c620b){var _0x3d5023=a4_0xf09eeb;return await this[_0x3d5023(0x204)](_0x52ace4+'#'+_0x2c620b);}async[a4_0xf09eeb(0x209)](_0x1af310,_0x5dea8a,_0x12a70e,_0x24f989){var _0x15c787=a4_0xf09eeb;return await this[_0x15c787(0x1ef)](_0x1af310+'#'+_0x5dea8a,_0x12a70e,_0x24f989);}async['hget'](_0x564311,_0x5e9041,_0x2daf0a,_0x40949d){var _0x5cd854=a4_0xf09eeb;return await this[_0x5cd854(0x210)](_0x564311+'#'+_0x5e9041,_0x2daf0a,_0x40949d);}[a4_0xf09eeb(0x1ed)](_0x8263bd){const _0x5c7b6a={'all':async()=>{var _0x5508a8=a4_0x2d3b,_0x1e3673,_0x979d06,_0x4ecd0f,_0x4f2fe4,_0x4d073e;return((_0x979d06=(_0x1e3673=this[_0x5508a8(0x20d)])===null||_0x1e3673===void 0x0?void 0x0:_0x1e3673[_0x5508a8(0x21b)])===null||_0x979d06===void 0x0?void 0x0:_0x979d06['name'])=='redis'?(await((_0x4d073e=(_0x4f2fe4=(_0x4ecd0f=this===null||this===void 0x0?void 0x0:this[_0x5508a8(0x20d)])===null||_0x4ecd0f===void 0x0?void 0x0:_0x4ecd0f[_0x5508a8(0x21b)])===null||_0x4f2fe4===void 0x0?void 0x0:_0x4f2fe4[_0x5508a8(0x1e9)]())===null||_0x4d073e===void 0x0?void 0x0:_0x4d073e[_0x5508a8(0x1f8)](this['prefix']+':'+_0x8263bd,0x0,-0x1))||[])['map'](_0x21c757=>json_decode(_0x21c757)):await this[_0x5508a8(0x210)](_0x8263bd,[]);},'pop':async()=>{var _0x478123=a4_0x2d3b,_0x2a84f0,_0x4743fc,_0x387d44,_0x10a369,_0x236513;if(((_0x4743fc=(_0x2a84f0=this[_0x478123(0x20d)])===null||_0x2a84f0===void 0x0?void 0x0:_0x2a84f0[_0x478123(0x21b)])===null||_0x4743fc===void 0x0?void 0x0:_0x4743fc['name'])=='redis')return json_decode(await((_0x236513=(_0x10a369=(_0x387d44=this===null||this===void 0x0?void 0x0:this[_0x478123(0x20d)])===null||_0x387d44===void 0x0?void 0x0:_0x387d44['store'])===null||_0x10a369===void 0x0?void 0x0:_0x10a369[_0x478123(0x1e9)]())===null||_0x236513===void 0x0?void 0x0:_0x236513[_0x478123(0x1ff)](this['prefix']+':'+_0x8263bd)));else{let _0x2b1c7e=await this[_0x478123(0x210)](_0x8263bd,[]),_0x11dce5=_0x2b1c7e['shift']();return await this['set'](_0x8263bd,_0x2b1c7e),_0x11dce5;}},'push':async(..._0x12477a)=>{var _0x2f5287=a4_0x2d3b,_0x58634f,_0x48ffee,_0x3100ed,_0xb6a07f,_0x6c4783;const _0x5bfc60=_0x12477a['filter'](_0x544bcf=>_0x544bcf!==undefined&&_0x544bcf!==null);if(((_0x48ffee=(_0x58634f=this[_0x2f5287(0x20d)])===null||_0x58634f===void 0x0?void 0x0:_0x58634f['store'])===null||_0x48ffee===void 0x0?void 0x0:_0x48ffee['name'])==_0x2f5287(0x1fd))return await((_0x6c4783=(_0xb6a07f=(_0x3100ed=this===null||this===void 0x0?void 0x0:this[_0x2f5287(0x20d)])===null||_0x3100ed===void 0x0?void 0x0:_0x3100ed[_0x2f5287(0x21b)])===null||_0xb6a07f===void 0x0?void 0x0:_0xb6a07f[_0x2f5287(0x1e9)]())===null||_0x6c4783===void 0x0?void 0x0:_0x6c4783['rpush'](this[_0x2f5287(0x217)]+':'+_0x8263bd,..._0x5bfc60[_0x2f5287(0x21c)](_0x307388=>json_encode(_0x307388)))),_0x5bfc60;else{let _0x369753=await this[_0x2f5287(0x210)](_0x8263bd,[]);return _0x369753['push'](..._0x5bfc60),await this['set'](_0x8263bd,_0x369753),_0x369753;}}};return _0x5c7b6a;}}exports[a4_0xf09eeb(0x212)]=Cache;function json_encode(_0x465774){var _0x2c21fd=a4_0xf09eeb;try{return JSON[_0x2c21fd(0x214)](_0x465774);}catch(_0x32747d){return undefined;}}function json_decode(_0x5ec609){var _0x312efc=a4_0xf09eeb;try{return JSON[_0x312efc(0x215)](_0x5ec609);}catch(_0x3de325){return undefined;}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"javascript-obfuscator": "^4.0.2",
|
|
25
25
|
"typescript": "^5.5.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "31a5e9fae8bec68f746c93e464a8bd57b90f108a"
|
|
28
28
|
}
|