@anncic-api/cache 1.0.6 → 1.0.9
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
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4cd9db=a0_0x439f;(function(_0x539afa,_0x100d9a){const _0x46bd3e=a0_0x439f,_0x4a46bb=_0x539afa();while(!![]){try{const _0x4a3c7e=parseInt(_0x46bd3e(0x17d))/0x1*(parseInt(_0x46bd3e(0x184))/0x2)+-parseInt(_0x46bd3e(0x17f))/0x3+-parseInt(_0x46bd3e(0x185))/0x4+-parseInt(_0x46bd3e(0x18b))/0x5*(parseInt(_0x46bd3e(0x188))/0x6)+parseInt(_0x46bd3e(0x18d))/0x7+-parseInt(_0x46bd3e(0x182))/0x8*(-parseInt(_0x46bd3e(0x18f))/0x9)+-parseInt(_0x46bd3e(0x187))/0xa*(-parseInt(_0x46bd3e(0x18c))/0xb);if(_0x4a3c7e===_0x100d9a)break;else _0x4a46bb['push'](_0x4a46bb['shift']());}catch(_0x295db5){_0x4a46bb['push'](_0x4a46bb['shift']());}}}(a0_0x461d,0x8a3b2));function a0_0x461d(){const _0x35735a=['435405hDUTFb','4169KWMTsG','3486686nGaWFi','__esModule','64206AmNZoq','127.0.0.1','17548uwNofO','cache-manager-ioredis','1321164BTtuTx','appDir','default','1016PlpqOu','/runtime/.cache','42dUNFJN','346152VGyciK','cache-manager-fs-hash','2750NIGkrk','54SJdOEz','file','memory'];a0_0x461d=function(){return _0x35735a;};return a0_0x461d();}Object['defineProperty'](exports,a0_0x4cd9db(0x18e),{'value':!![]});const fsStore=require(a0_0x4cd9db(0x186)),redisStore=require(a0_0x4cd9db(0x17e));function a0_0x439f(_0x1ab921,_0x180707){const _0x461d80=a0_0x461d();return a0_0x439f=function(_0x439f94,_0x159a43){_0x439f94=_0x439f94-0x17c;let _0x510e02=_0x461d80[_0x439f94];return _0x510e02;},a0_0x439f(_0x1ab921,_0x180707);}exports[a0_0x4cd9db(0x181)]=_0xa9e2fb=>{const _0x3e89fc=a0_0x4cd9db;return{'cache':{'default':_0x3e89fc(0x189),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0xa9e2fb[_0x3e89fc(0x180)]+_0x3e89fc(0x183)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x3e89fc(0x17c),'password':'','ttl':0x1e13380,'keyPrefix':_0xa9e2fb['name']+':'}},'memory':{'store':_0x3e89fc(0x18a),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x37c41f=a1_0x1447;(function(_0x18fec1,_0xc54560){var _0x212456=a1_0x1447,_0x19f5fc=_0x18fec1();while(!![]){try{var _0x1c29d0=parseInt(_0x212456(0xd5))/0x1*(-parseInt(_0x212456(0xcb))/0x2)+-parseInt(_0x212456(0xcf))/0x3*(parseInt(_0x212456(0xe1))/0x4)+parseInt(_0x212456(0xe0))/0x5*(-parseInt(_0x212456(0xdf))/0x6)+-parseInt(_0x212456(0xd6))/0x7+-parseInt(_0x212456(0xcc))/0x8+parseInt(_0x212456(0xcd))/0x9+parseInt(_0x212456(0xda))/0xa;if(_0x1c29d0===_0xc54560)break;else _0x19f5fc['push'](_0x19f5fc['shift']());}catch(_0x326e1e){_0x19f5fc['push'](_0x19f5fc['shift']());}}}(a1_0x1b0c,0xb515d));var __decorate=this&&this[a1_0x37c41f(0xdd)]||function(_0x5dca32,_0x1021cb,_0x3f4cde,_0x13e812){var _0x36b9eb=a1_0x37c41f,_0x2bcc6f=arguments[_0x36b9eb(0xdc)],_0x12113d=_0x2bcc6f<0x3?_0x1021cb:_0x13e812===null?_0x13e812=Object[_0x36b9eb(0xd9)](_0x1021cb,_0x3f4cde):_0x13e812,_0x4900dc;if(typeof Reflect===_0x36b9eb(0xde)&&typeof Reflect[_0x36b9eb(0xd1)]===_0x36b9eb(0xd8))_0x12113d=Reflect[_0x36b9eb(0xd1)](_0x5dca32,_0x1021cb,_0x3f4cde,_0x13e812);else{for(var _0x5d07bd=_0x5dca32[_0x36b9eb(0xdc)]-0x1;_0x5d07bd>=0x0;_0x5d07bd--)if(_0x4900dc=_0x5dca32[_0x5d07bd])_0x12113d=(_0x2bcc6f<0x3?_0x4900dc(_0x12113d):_0x2bcc6f>0x3?_0x4900dc(_0x1021cb,_0x3f4cde,_0x12113d):_0x4900dc(_0x1021cb,_0x3f4cde))||_0x12113d;}return _0x2bcc6f>0x3&&_0x12113d&&Object[_0x36b9eb(0xdb)](_0x1021cb,_0x3f4cde,_0x12113d),_0x12113d;};function a1_0x1447(_0x27135b,_0x99252a){var _0x1b0ce4=a1_0x1b0c();return a1_0x1447=function(_0x1447d4,_0x4531d1){_0x1447d4=_0x1447d4-0xcb;var _0x158d94=_0x1b0ce4[_0x1447d4];return _0x158d94;},a1_0x1447(_0x27135b,_0x99252a);}Object['defineProperty'](exports,a1_0x37c41f(0xd3),{'value':!![]}),exports[a1_0x37c41f(0xd2)]=void 0x0;const decorator_1=require(a1_0x37c41f(0xd0)),ConfigDefault=require(a1_0x37c41f(0xd7));function a1_0x1b0c(){var _0x290056=['defineProperty','length','__decorate','object','594vbYOwC','26310tQsKhK','4999364UQIzNd','423066KHLTwZ','5834376QWKQlW','11313918efMpAa','anncic-api:cache','3qUoLIn','@midwayjs/decorator','decorate','CustomConfiguration','__esModule','Configuration','1zuHZeT','6633592EpzCKP','./config/config.default','function','getOwnPropertyDescriptor','31438880GOmKmf'];a1_0x1b0c=function(){return _0x290056;};return a1_0x1b0c();}let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1[a1_0x37c41f(0xd4)])({'conflictCheck':![],'namespace':a1_0x37c41f(0xce),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x37c41f(0xd2)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x5a08cb=a2_0x5bf4;function a2_0x5bf4(_0x103550,_0x21993f){const _0x8ae63f=a2_0x8ae6();return a2_0x5bf4=function(_0x5bf4c4,_0x460609){_0x5bf4c4=_0x5bf4c4-0x14d;let _0x3a417a=_0x8ae63f[_0x5bf4c4];return _0x3a417a;},a2_0x5bf4(_0x103550,_0x21993f);}(function(_0x1cd4d7,_0x3949f9){const _0x4dab4a=a2_0x5bf4,_0x11a029=_0x1cd4d7();while(!![]){try{const _0xf27d5c=-parseInt(_0x4dab4a(0x151))/0x1+-parseInt(_0x4dab4a(0x15a))/0x2*(parseInt(_0x4dab4a(0x150))/0x3)+parseInt(_0x4dab4a(0x162))/0x4+-parseInt(_0x4dab4a(0x161))/0x5*(parseInt(_0x4dab4a(0x14f))/0x6)+-parseInt(_0x4dab4a(0x163))/0x7+parseInt(_0x4dab4a(0x14e))/0x8+parseInt(_0x4dab4a(0x164))/0x9;if(_0xf27d5c===_0x3949f9)break;else _0x11a029['push'](_0x11a029['shift']());}catch(_0x1a35af){_0x11a029['push'](_0x11a029['shift']());}}}(a2_0x8ae6,0xc92df));function a2_0x8ae6(){const _0x102918=['8642416VBJkdG','78XDdtga','15YFbqEi','538937DXBBsC','parse','toString','getAsync','use','getApplicationContext','defineProperty','get','app','409646OXAScc','../service/CacheService','stringify','MethodDecorator','Cache','apply','__esModule','21765MXSBfQ','3485660MCGRgG','6654165FAxiQB','12982950FfnhHt','MD5','REQUEST_OBJ_CTX_KEY','value'];a2_0x8ae6=function(){return _0x102918;};return a2_0x8ae6();}Object[a2_0x5a08cb(0x157)](exports,a2_0x5a08cb(0x160),{'value':!![]}),exports[a2_0x5a08cb(0x15e)]=void 0x0;const crypto_js_1=require('crypto-js'),CacheService_1=require(a2_0x5a08cb(0x15b)),core_1=require('@midwayjs/core');function Cache(_0x5357c3,_0x5d2ff7){return(_0x3a8689,_0x1c7db3,_0x3d5660)=>{const _0x2cbfeb=a2_0x5bf4,_0x2a8010=_0x3d5660[_0x2cbfeb(0x14d)];return _0x3d5660[_0x2cbfeb(0x14d)]=async function(..._0xbc7a1c){const _0x1d6b79=_0x2cbfeb;!_0x5357c3&&(_0x5357c3=(0x0,crypto_js_1[_0x1d6b79(0x165)])(JSON[_0x1d6b79(0x15c)](_0xbc7a1c))[_0x1d6b79(0x153)]());let _0x142102=await this[core_1[_0x1d6b79(0x166)]][_0x1d6b79(0x159)][_0x1d6b79(0x156)]()[_0x1d6b79(0x154)](CacheService_1['CacheService']),_0x135e2b=await _0x142102[_0x1d6b79(0x155)](_0x1d6b79(0x15d))[_0x1d6b79(0x158)](_0x5357c3);if(_0x135e2b)return JSON[_0x1d6b79(0x152)](_0x135e2b);else _0x135e2b=await _0x2a8010[_0x1d6b79(0x15f)](this,[..._0xbc7a1c]),await _0x142102[_0x1d6b79(0x155)](_0x1d6b79(0x15d))['set'](_0x5357c3,JSON['stringify'](_0x135e2b),_0x5d2ff7);return _0x135e2b;},_0x3d5660;};}exports['Cache']=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a3_0x587b(_0x4233f7,_0x2ddd2f){var _0x228dc1=a3_0x228d();return a3_0x587b=function(_0x587bf8,_0x29496e){_0x587bf8=_0x587bf8-0x13f;var _0x2a39d1=_0x228dc1[_0x587bf8];return _0x2a39d1;},a3_0x587b(_0x4233f7,_0x2ddd2f);}var a3_0x590539=a3_0x587b;(function(_0x562c1a,_0x29710f){var _0x4e6d90=a3_0x587b,_0x292537=_0x562c1a();while(!![]){try{var _0x397246=-parseInt(_0x4e6d90(0x143))/0x1*(-parseInt(_0x4e6d90(0x142))/0x2)+parseInt(_0x4e6d90(0x144))/0x3*(-parseInt(_0x4e6d90(0x14a))/0x4)+parseInt(_0x4e6d90(0x140))/0x5*(parseInt(_0x4e6d90(0x13f))/0x6)+-parseInt(_0x4e6d90(0x14b))/0x7*(parseInt(_0x4e6d90(0x14c))/0x8)+parseInt(_0x4e6d90(0x14f))/0x9+parseInt(_0x4e6d90(0x14d))/0xa+parseInt(_0x4e6d90(0x149))/0xb;if(_0x397246===_0x29710f)break;else _0x292537['push'](_0x292537['shift']());}catch(_0x5e9cea){_0x292537['push'](_0x292537['shift']());}}}(a3_0x228d,0xa6d87));Object[a3_0x590539(0x150)](exports,a3_0x590539(0x141),{'value':!![]}),exports['CacheService']=exports['Cache']=exports[a3_0x590539(0x14e)]=void 0x0;var configuration_1=require('./configuration');Object['defineProperty'](exports,a3_0x590539(0x14e),{'enumerable':!![],'get':function(){var _0x5c9743=a3_0x590539;return configuration_1[_0x5c9743(0x145)];}});var Cache_1=require(a3_0x590539(0x146));Object['defineProperty'](exports,a3_0x590539(0x148),{'enumerable':!![],'get':function(){var _0x2d3e7e=a3_0x590539;return Cache_1[_0x2d3e7e(0x148)];}});function a3_0x228d(){var _0x359ff0=['49079qdsfwt','3043911KbCfHE','CustomConfiguration','./decorator/Cache','CacheService','Cache','6515773ygvKPw','4yrkdXU','12642CxlkHH','3208ZiyrHC','3041410ncOUQT','Configuration','3679578YVNNaY','defineProperty','6138JmYUpH','3540SThNpX','__esModule','16MKQhJB'];a3_0x228d=function(){return _0x359ff0;};return a3_0x228d();}var CacheService_1=require('./service/CacheService');Object[a3_0x590539(0x150)](exports,a3_0x590539(0x147),{'enumerable':!![],'get':function(){return CacheService_1['CacheService'];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x10a906=a4_0x3d8e;(function(_0x1f3474,_0x5368e5){var _0x401a13=a4_0x3d8e,_0x3d6c5e=_0x1f3474();while(!![]){try{var _0x2c635c=parseInt(_0x401a13(0x15f))/0x1+parseInt(_0x401a13(0x14d))/0x2*(parseInt(_0x401a13(0x159))/0x3)+-parseInt(_0x401a13(0x146))/0x4*(-parseInt(_0x401a13(0x165))/0x5)+parseInt(_0x401a13(0x171))/0x6*(-parseInt(_0x401a13(0x169))/0x7)+parseInt(_0x401a13(0x149))/0x8*(-parseInt(_0x401a13(0x16c))/0x9)+parseInt(_0x401a13(0x164))/0xa+-parseInt(_0x401a13(0x15e))/0xb*(parseInt(_0x401a13(0x15a))/0xc);if(_0x2c635c===_0x5368e5)break;else _0x3d6c5e['push'](_0x3d6c5e['shift']());}catch(_0x553167){_0x3d6c5e['push'](_0x3d6c5e['shift']());}}}(a4_0x2353,0x96d22));var __decorate=this&&this['__decorate']||function(_0x2197ca,_0x599ff3,_0x496630,_0x1c1ee3){var _0x3d6008=a4_0x3d8e,_0x1846ba=arguments[_0x3d6008(0x151)],_0x20f217=_0x1846ba<0x3?_0x599ff3:_0x1c1ee3===null?_0x1c1ee3=Object[_0x3d6008(0x162)](_0x599ff3,_0x496630):_0x1c1ee3,_0x588a4b;if(typeof Reflect===_0x3d6008(0x153)&&typeof Reflect[_0x3d6008(0x154)]===_0x3d6008(0x15b))_0x20f217=Reflect[_0x3d6008(0x154)](_0x2197ca,_0x599ff3,_0x496630,_0x1c1ee3);else{for(var _0x5c676c=_0x2197ca[_0x3d6008(0x151)]-0x1;_0x5c676c>=0x0;_0x5c676c--)if(_0x588a4b=_0x2197ca[_0x5c676c])_0x20f217=(_0x1846ba<0x3?_0x588a4b(_0x20f217):_0x1846ba>0x3?_0x588a4b(_0x599ff3,_0x496630,_0x20f217):_0x588a4b(_0x599ff3,_0x496630))||_0x20f217;}return _0x1846ba>0x3&&_0x20f217&&Object[_0x3d6008(0x14c)](_0x599ff3,_0x496630,_0x20f217),_0x20f217;},__metadata=this&&this[a4_0x10a906(0x16d)]||function(_0x44b9f9,_0x4d09f0){var _0x103d70=a4_0x10a906;if(typeof Reflect==='object'&&typeof Reflect[_0x103d70(0x16a)]==='function')return Reflect[_0x103d70(0x16a)](_0x44b9f9,_0x4d09f0);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a4_0x10a906(0x15d)]=void 0x0;function a4_0x3d8e(_0x5da603,_0x51623c){var _0x2353d9=a4_0x2353();return a4_0x3d8e=function(_0x3d8ed9,_0x464ef7){_0x3d8ed9=_0x3d8ed9-0x145;var _0x3829c3=_0x2353d9[_0x3d8ed9];return _0x3829c3;},a4_0x3d8e(_0x5da603,_0x51623c);}function a4_0x2353(){var _0x37c5b8=['hget','ScopeEnum','length','set','object','decorate','prototype','get','hset','design:type','3009VifvEi','109068QDXjqU','function','prefix','CacheService','1529VyYMxH','1088726NRMfyy','cache','reset','getOwnPropertyDescriptor','Singleton','1497230TxbhXV','55hVEwKP','Config','Scope','stores','7LcImjN','metadata','cache-manager','2526705zPvjMh','__metadata','@midwayjs/decorator','default','use','2702514rMZYem','caching','224212NDiZmA','options','config','8VlOMSA','del','hdel','defineProperty','1510IhMrpr','clients'];a4_0x2353=function(){return _0x37c5b8;};return a4_0x2353();}const cacheManager=require(a4_0x10a906(0x16b)),decorator_1=require(a4_0x10a906(0x16e));let CacheService=class CacheService{constructor(){var _0x2512c8=a4_0x10a906;this[_0x2512c8(0x160)]=undefined,this[_0x2512c8(0x14e)]=new Map();}[a4_0x10a906(0x170)](_0x532876){var _0x6b85f5=a4_0x10a906,_0x584e0d,_0x584cc7;if(!this[_0x6b85f5(0x160)]){const _0x3a4056=((_0x584e0d=this[_0x6b85f5(0x148)][_0x6b85f5(0x168)])===null||_0x584e0d===void 0x0?void 0x0:_0x584e0d[(_0x584cc7=this[_0x6b85f5(0x148)][_0x6b85f5(0x160)])===null||_0x584cc7===void 0x0?void 0x0:_0x584cc7[_0x6b85f5(0x16f)]])||this[_0x6b85f5(0x148)][_0x6b85f5(0x168)]['file'];this['cache']=cacheManager[_0x6b85f5(0x145)]({..._0x3a4056[_0x6b85f5(0x147)],'store':_0x3a4056['store']});}return!this[_0x6b85f5(0x14e)]['has'](_0x532876)&&this['clients'][_0x6b85f5(0x152)](_0x532876,new CacheHandler(_0x532876,this[_0x6b85f5(0x160)])),this['clients'][_0x6b85f5(0x156)](_0x532876);}async['reset'](){var _0x2d03bf=a4_0x10a906;return await this[_0x2d03bf(0x160)][_0x2d03bf(0x161)]();}};__decorate([(0x0,decorator_1[a4_0x10a906(0x166)])(a4_0x10a906(0x160)),__metadata(a4_0x10a906(0x158),Object)],CacheService[a4_0x10a906(0x155)],'config',void 0x0),CacheService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1[a4_0x10a906(0x167)])(decorator_1[a4_0x10a906(0x150)][a4_0x10a906(0x163)])],CacheService),exports[a4_0x10a906(0x15d)]=CacheService;class CacheHandler{constructor(_0x78bc30,_0x4013f5){var _0xdb9110=a4_0x10a906;this[_0xdb9110(0x160)]=_0x4013f5,this['prefix']=_0x78bc30;}async[a4_0x10a906(0x14a)](_0x3367df){var _0x5b9ea1=a4_0x10a906;return await this['cache']['del'](this[_0x5b9ea1(0x15c)]+':'+_0x3367df);}async[a4_0x10a906(0x152)](_0x9d5bcf,_0x348b73,_0x366fdd){var _0x187d28=a4_0x10a906;return await this[_0x187d28(0x160)][_0x187d28(0x152)](this['prefix']+':'+_0x9d5bcf,_0x348b73,_0x366fdd);}async[a4_0x10a906(0x156)](_0x1a1d17,_0x357a58){return new Promise((_0x25c257,_0x396650)=>{var _0xdb0214=a4_0x3d8e;this[_0xdb0214(0x160)][_0xdb0214(0x156)](this[_0xdb0214(0x15c)]+':'+_0x1a1d17,(_0x349756,_0x31b2bb)=>{_0x349756?_0x396650(_0x349756):_0x25c257(_0x31b2bb||_0x357a58);});});}async[a4_0x10a906(0x14b)](_0x339a53,_0x66b6e0){return await this['del'](_0x339a53+'-'+_0x66b6e0);}async[a4_0x10a906(0x157)](_0x264362,_0x437f45,_0x561d4f,_0x387098){var _0x5051a8=a4_0x10a906;return await this[_0x5051a8(0x152)](_0x264362+'-'+_0x437f45,_0x561d4f,_0x387098);}async[a4_0x10a906(0x14f)](_0x2cdec1,_0x1b5ed4,_0x3ff199){var _0x4e9af1=a4_0x10a906;return await this[_0x4e9af1(0x156)](_0x2cdec1+'-'+_0x1b5ed4,_0x3ff199);}}
|