@anncic-api/cache 1.0.9 → 1.0.12
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';const
|
|
1
|
+
'use strict';function a0_0x1b12(){const _0x5782bc=['1071682KoCBOe','127.0.0.1','522130RHIJwB','5196MIVpCG','appDir','/runtime/.cache','12xKwJrL','4589560eNGOJL','24LkZRPs','defineProperty','default','__esModule','12649EjaKsd','9886822xhUIfp','470150jhNVTU','99Bcvrxz','memory','3SifFhc','cache-manager-fs-hash','file','15WlziYx','name'];a0_0x1b12=function(){return _0x5782bc;};return a0_0x1b12();}function a0_0x24e1(_0x29d44c,_0x5094ce){const _0x1b127c=a0_0x1b12();return a0_0x24e1=function(_0x24e1ec,_0x61fdb4){_0x24e1ec=_0x24e1ec-0x1e2;let _0x3fc8d5=_0x1b127c[_0x24e1ec];return _0x3fc8d5;},a0_0x24e1(_0x29d44c,_0x5094ce);}const a0_0x5f2080=a0_0x24e1;(function(_0x5354d0,_0x53f66e){const _0x45e17c=a0_0x24e1,_0x189f64=_0x5354d0();while(!![]){try{const _0x5a2101=-parseInt(_0x45e17c(0x1f2))/0x1+-parseInt(_0x45e17c(0x1e4))/0x2*(-parseInt(_0x45e17c(0x1f5))/0x3)+-parseInt(_0x45e17c(0x1e7))/0x4*(parseInt(_0x45e17c(0x1e2))/0x5)+-parseInt(_0x45e17c(0x1ec))/0x6*(parseInt(_0x45e17c(0x1f0))/0x7)+parseInt(_0x45e17c(0x1eb))/0x8+parseInt(_0x45e17c(0x1f3))/0x9*(parseInt(_0x45e17c(0x1e6))/0xa)+parseInt(_0x45e17c(0x1f1))/0xb*(-parseInt(_0x45e17c(0x1ea))/0xc);if(_0x5a2101===_0x53f66e)break;else _0x189f64['push'](_0x189f64['shift']());}catch(_0x308b23){_0x189f64['push'](_0x189f64['shift']());}}}(a0_0x1b12,0x4a2ba));Object[a0_0x5f2080(0x1ed)](exports,a0_0x5f2080(0x1ef),{'value':!![]});const fsStore=require(a0_0x5f2080(0x1f6)),redisStore=require('cache-manager-ioredis');exports[a0_0x5f2080(0x1ee)]=_0x33336d=>{const _0x2925ef=a0_0x5f2080;return{'cache':{'default':_0x2925ef(0x1f7),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x33336d[_0x2925ef(0x1e8)]+_0x2925ef(0x1e9)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x2925ef(0x1e5),'password':'','ttl':0x1e13380,'keyPrefix':_0x33336d[_0x2925ef(0x1e3)]+':'}},'memory':{'store':_0x2925ef(0x1f4),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x42904e=a1_0x1a70;function a1_0x1a70(_0x4ad841,_0x33b0ad){var _0x65f822=a1_0x65f8();return a1_0x1a70=function(_0x1a70c8,_0x80d94f){_0x1a70c8=_0x1a70c8-0x90;var _0x50fced=_0x65f822[_0x1a70c8];return _0x50fced;},a1_0x1a70(_0x4ad841,_0x33b0ad);}function a1_0x65f8(){var _0x5802f6=['3682674HfSvvj','2522751SGimvr','3450VDZlec','2256VCePLC','anncic-api:cache','1355XtpmHY','67036bbwcMI','length','__esModule','973chVgqX','173251ZOozaa','CustomConfiguration','function','defineProperty','2790159sVCteb','4tiAiip','5CsBAYS','decorate','10RBDqwJ','53992SLWXVX','object'];a1_0x65f8=function(){return _0x5802f6;};return a1_0x65f8();}(function(_0x3abbb3,_0x5be576){var _0x348b42=a1_0x1a70,_0x19fb21=_0x3abbb3();while(!![]){try{var _0x3fde65=-parseInt(_0x348b42(0xa4))/0x1*(-parseInt(_0x348b42(0x9a))/0x2)+-parseInt(_0x348b42(0xa2))/0x3*(parseInt(_0x348b42(0xa3))/0x4)+parseInt(_0x348b42(0x99))/0x5*(-parseInt(_0x348b42(0x96))/0x6)+-parseInt(_0x348b42(0x9d))/0x7*(parseInt(_0x348b42(0x92))/0x8)+parseInt(_0x348b42(0x94))/0x9*(-parseInt(_0x348b42(0x91))/0xa)+parseInt(_0x348b42(0x95))/0xb+parseInt(_0x348b42(0x97))/0xc*(parseInt(_0x348b42(0x9e))/0xd);if(_0x3fde65===_0x5be576)break;else _0x19fb21['push'](_0x19fb21['shift']());}catch(_0x5f27c1){_0x19fb21['push'](_0x19fb21['shift']());}}}(a1_0x65f8,0x728f0));var __decorate=this&&this['__decorate']||function(_0xbe829e,_0x5a6a67,_0x52aad0,_0x1df75b){var _0x5d531f=a1_0x1a70,_0x3c60ea=arguments[_0x5d531f(0x9b)],_0x345998=_0x3c60ea<0x3?_0x5a6a67:_0x1df75b===null?_0x1df75b=Object['getOwnPropertyDescriptor'](_0x5a6a67,_0x52aad0):_0x1df75b,_0x1a7376;if(typeof Reflect===_0x5d531f(0x93)&&typeof Reflect[_0x5d531f(0x90)]===_0x5d531f(0xa0))_0x345998=Reflect[_0x5d531f(0x90)](_0xbe829e,_0x5a6a67,_0x52aad0,_0x1df75b);else{for(var _0x38b8c3=_0xbe829e[_0x5d531f(0x9b)]-0x1;_0x38b8c3>=0x0;_0x38b8c3--)if(_0x1a7376=_0xbe829e[_0x38b8c3])_0x345998=(_0x3c60ea<0x3?_0x1a7376(_0x345998):_0x3c60ea>0x3?_0x1a7376(_0x5a6a67,_0x52aad0,_0x345998):_0x1a7376(_0x5a6a67,_0x52aad0))||_0x345998;}return _0x3c60ea>0x3&&_0x345998&&Object[_0x5d531f(0xa1)](_0x5a6a67,_0x52aad0,_0x345998),_0x345998;};Object[a1_0x42904e(0xa1)](exports,a1_0x42904e(0x9c),{'value':!![]}),exports[a1_0x42904e(0x9f)]=void 0x0;const decorator_1=require('@midwayjs/decorator'),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'conflictCheck':![],'namespace':a1_0x42904e(0x98),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x42904e(0x9f)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x4efeb1=a2_0x5b26;(function(_0x2b2f98,_0x8dfb17){const _0x4cc624=a2_0x5b26,_0x218563=_0x2b2f98();while(!![]){try{const _0x501892=parseInt(_0x4cc624(0xbf))/0x1+-parseInt(_0x4cc624(0xbb))/0x2+-parseInt(_0x4cc624(0xb4))/0x3*(parseInt(_0x4cc624(0xb3))/0x4)+-parseInt(_0x4cc624(0xc3))/0x5*(-parseInt(_0x4cc624(0xbc))/0x6)+-parseInt(_0x4cc624(0xba))/0x7+-parseInt(_0x4cc624(0xbd))/0x8*(parseInt(_0x4cc624(0xb2))/0x9)+-parseInt(_0x4cc624(0xae))/0xa*(-parseInt(_0x4cc624(0xc6))/0xb);if(_0x501892===_0x8dfb17)break;else _0x218563['push'](_0x218563['shift']());}catch(_0x45b1fd){_0x218563['push'](_0x218563['shift']());}}}(a2_0x5995,0xaefe6));Object['defineProperty'](exports,a2_0x4efeb1(0xb6),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require('crypto-js'),CacheService_1=require(a2_0x4efeb1(0xb9)),core_1=require('@midwayjs/core');function a2_0x5995(){const _0x4e1b2d=['1378666iycywC','Cache','toString','apply','45sMWGIc','CacheService','use','10239218shIsCy','getAsync','REQUEST_OBJ_CTX_KEY','20XrEQhm','app','value','parse','2637wqFCIB','12ZRJumq','521739bDlnpy','stringify','__esModule','getApplicationContext','get','../service/CacheService','2884000hqyooK','2617546eFTHDG','399606yNcTeN','24040HzyDdG','MethodDecorator'];a2_0x5995=function(){return _0x4e1b2d;};return a2_0x5995();}function a2_0x5b26(_0x20fa73,_0x33c0ee){const _0x5995ec=a2_0x5995();return a2_0x5b26=function(_0x5b269b,_0x31d01a){_0x5b269b=_0x5b269b-0xae;let _0x575997=_0x5995ec[_0x5b269b];return _0x575997;},a2_0x5b26(_0x20fa73,_0x33c0ee);}function Cache(_0x4befdc,_0x90bb28){return(_0x272978,_0x176602,_0x5a1606)=>{const _0x4f955f=a2_0x5b26,_0x5023c4=_0x5a1606[_0x4f955f(0xb0)];return _0x5a1606['value']=async function(..._0x2b5eb0){const _0x3b020e=_0x4f955f;!_0x4befdc&&(_0x4befdc=(0x0,crypto_js_1['MD5'])(JSON[_0x3b020e(0xb5)](_0x2b5eb0))[_0x3b020e(0xc1)]());let _0xc14eda=await this[core_1[_0x3b020e(0xc8)]][_0x3b020e(0xaf)][_0x3b020e(0xb7)]()[_0x3b020e(0xc7)](CacheService_1[_0x3b020e(0xc4)]),_0x5cff99=await _0xc14eda[_0x3b020e(0xc5)](_0x3b020e(0xbe))[_0x3b020e(0xb8)](_0x4befdc);if(_0x5cff99)return JSON[_0x3b020e(0xb1)](_0x5cff99);else _0x5cff99=await _0x5023c4[_0x3b020e(0xc2)](this,[..._0x2b5eb0]),await _0xc14eda[_0x3b020e(0xc5)]('MethodDecorator')['set'](_0x4befdc,JSON[_0x3b020e(0xb5)](_0x5cff99),_0x90bb28);return _0x5cff99;},_0x5a1606;};}exports[a2_0x4efeb1(0xc0)]=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a3_0x2d973f=a3_0x4907;(function(_0x5be702,_0x59f879){var _0x139f98=a3_0x4907,_0x5d7638=_0x5be702();while(!![]){try{var _0x5562e2=parseInt(_0x139f98(0xb2))/0x1*(-parseInt(_0x139f98(0xb1))/0x2)+-parseInt(_0x139f98(0xb0))/0x3*(parseInt(_0x139f98(0xad))/0x4)+-parseInt(_0x139f98(0xa5))/0x5*(parseInt(_0x139f98(0xaa))/0x6)+-parseInt(_0x139f98(0xa6))/0x7+-parseInt(_0x139f98(0xae))/0x8+-parseInt(_0x139f98(0xa9))/0x9+parseInt(_0x139f98(0xb3))/0xa;if(_0x5562e2===_0x59f879)break;else _0x5d7638['push'](_0x5d7638['shift']());}catch(_0x5f20f5){_0x5d7638['push'](_0x5d7638['shift']());}}}(a3_0x143d,0xb386e));Object[a3_0x2d973f(0xab)](exports,a3_0x2d973f(0xa7),{'value':!![]}),exports['CacheService']=exports[a3_0x2d973f(0xac)]=exports['Configuration']=void 0x0;var configuration_1=require(a3_0x2d973f(0xaf));function a3_0x143d(){var _0x34b2a6=['./service/CacheService','CustomConfiguration','3085vVlSdg','1162616GjRHtn','__esModule','./decorator/Cache','4157262yWyrko','348NpVwII','defineProperty','Cache','4CRvNnG','4370688WxFkhY','./configuration','2650722JHHJLI','476okazkc','3761UGZTbU','37241620UFptiu'];a3_0x143d=function(){return _0x34b2a6;};return a3_0x143d();}Object[a3_0x2d973f(0xab)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x4ce152=a3_0x2d973f;return configuration_1[_0x4ce152(0xa4)];}});var Cache_1=require(a3_0x2d973f(0xa8));Object[a3_0x2d973f(0xab)](exports,a3_0x2d973f(0xac),{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});function a3_0x4907(_0x254178,_0x5b0158){var _0x143d08=a3_0x143d();return a3_0x4907=function(_0x49070c,_0x3493a0){_0x49070c=_0x49070c-0xa3;var _0x425ed6=_0x143d08[_0x49070c];return _0x425ed6;},a3_0x4907(_0x254178,_0x5b0158);}var CacheService_1=require(a3_0x2d973f(0xa3));Object['defineProperty'](exports,'CacheService',{'enumerable':!![],'get':function(){return CacheService_1['CacheService'];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a4_0xa8fd(_0x2a8157,_0x1322d2){var _0x562389=a4_0x5623();return a4_0xa8fd=function(_0xa8fdc9,_0x268d84){_0xa8fdc9=_0xa8fdc9-0x173;var _0x1b0615=_0x562389[_0xa8fdc9];return _0x1b0615;},a4_0xa8fd(_0x2a8157,_0x1322d2);}var a4_0x76c570=a4_0xa8fd;(function(_0x290530,_0x43e583){var _0x232335=a4_0xa8fd,_0x50a721=_0x290530();while(!![]){try{var _0x9c1a37=parseInt(_0x232335(0x195))/0x1*(-parseInt(_0x232335(0x17a))/0x2)+-parseInt(_0x232335(0x18d))/0x3*(parseInt(_0x232335(0x194))/0x4)+-parseInt(_0x232335(0x186))/0x5+parseInt(_0x232335(0x19d))/0x6+-parseInt(_0x232335(0x197))/0x7*(parseInt(_0x232335(0x19e))/0x8)+-parseInt(_0x232335(0x192))/0x9*(parseInt(_0x232335(0x187))/0xa)+-parseInt(_0x232335(0x19c))/0xb*(-parseInt(_0x232335(0x18f))/0xc);if(_0x9c1a37===_0x43e583)break;else _0x50a721['push'](_0x50a721['shift']());}catch(_0xe4a24d){_0x50a721['push'](_0x50a721['shift']());}}}(a4_0x5623,0xdd2dc));function a4_0x5623(){var _0x47140c=['defineProperty','set','264105SfwusC','reset','334388ldvSsX','4MOOaQY','prefix','274267HYIykI','@midwayjs/decorator','del','file','function','374XFDraM','10673796scEweZ','8PBDTde','default','cache','__decorate','metadata','object','CacheService','caching','702440LWdhZK','Scope','__metadata','hset','config','use','Singleton','store','clients','design:type','__esModule','hdel','3003760NujZzD','170PGIEZA','stores','cache-manager','Provide','decorate','has','12ZMSClx','get','707664eisoEG'];a4_0x5623=function(){return _0x47140c;};return a4_0x5623();}var __decorate=this&&this[a4_0x76c570(0x175)]||function(_0x5e1afa,_0x457299,_0x446b28,_0x598631){var _0x3f1502=a4_0x76c570,_0x1a1d02=arguments['length'],_0x58122d=_0x1a1d02<0x3?_0x457299:_0x598631===null?_0x598631=Object['getOwnPropertyDescriptor'](_0x457299,_0x446b28):_0x598631,_0xfe140c;if(typeof Reflect===_0x3f1502(0x177)&&typeof Reflect[_0x3f1502(0x18b)]===_0x3f1502(0x19b))_0x58122d=Reflect[_0x3f1502(0x18b)](_0x5e1afa,_0x457299,_0x446b28,_0x598631);else{for(var _0x3e895b=_0x5e1afa['length']-0x1;_0x3e895b>=0x0;_0x3e895b--)if(_0xfe140c=_0x5e1afa[_0x3e895b])_0x58122d=(_0x1a1d02<0x3?_0xfe140c(_0x58122d):_0x1a1d02>0x3?_0xfe140c(_0x457299,_0x446b28,_0x58122d):_0xfe140c(_0x457299,_0x446b28))||_0x58122d;}return _0x1a1d02>0x3&&_0x58122d&&Object[_0x3f1502(0x190)](_0x457299,_0x446b28,_0x58122d),_0x58122d;},__metadata=this&&this[a4_0x76c570(0x17c)]||function(_0x3dd78b,_0x32946e){var _0x54baf4=a4_0x76c570;if(typeof Reflect===_0x54baf4(0x177)&&typeof Reflect[_0x54baf4(0x176)]===_0x54baf4(0x19b))return Reflect['metadata'](_0x3dd78b,_0x32946e);};Object['defineProperty'](exports,a4_0x76c570(0x184),{'value':!![]}),exports[a4_0x76c570(0x178)]=void 0x0;const cacheManager=require(a4_0x76c570(0x189)),decorator_1=require(a4_0x76c570(0x198));let CacheService=class CacheService{constructor(){var _0x4be356=a4_0x76c570;this[_0x4be356(0x174)]=undefined,this['clients']=new Map();}[a4_0x76c570(0x17f)](_0x4bfe2d){var _0x14c310=a4_0x76c570,_0xfeddfa,_0x13ef82;if(!this[_0x14c310(0x174)]){const _0x344ee1=((_0xfeddfa=this['config'][_0x14c310(0x188)])===null||_0xfeddfa===void 0x0?void 0x0:_0xfeddfa[(_0x13ef82=this[_0x14c310(0x17e)][_0x14c310(0x174)])===null||_0x13ef82===void 0x0?void 0x0:_0x13ef82[_0x14c310(0x173)]])||this[_0x14c310(0x17e)][_0x14c310(0x188)][_0x14c310(0x19a)];this[_0x14c310(0x174)]=cacheManager[_0x14c310(0x179)]({..._0x344ee1['options'],'store':_0x344ee1[_0x14c310(0x181)]});}return!this[_0x14c310(0x182)][_0x14c310(0x18c)](_0x4bfe2d)&&this[_0x14c310(0x182)]['set'](_0x4bfe2d,new CacheHandler(_0x4bfe2d,this[_0x14c310(0x174)])),this['clients'][_0x14c310(0x18e)](_0x4bfe2d);}async[a4_0x76c570(0x193)](){var _0x4f09da=a4_0x76c570;return await this[_0x4f09da(0x174)][_0x4f09da(0x193)]();}};__decorate([(0x0,decorator_1['Config'])('cache'),__metadata(a4_0x76c570(0x183),Object)],CacheService['prototype'],a4_0x76c570(0x17e),void 0x0),CacheService=__decorate([(0x0,decorator_1[a4_0x76c570(0x18a)])(),(0x0,decorator_1[a4_0x76c570(0x17b)])(decorator_1['ScopeEnum'][a4_0x76c570(0x180)])],CacheService),exports[a4_0x76c570(0x178)]=CacheService;class CacheHandler{constructor(_0x5b04bc,_0x482511){var _0x324e77=a4_0x76c570;this[_0x324e77(0x174)]=_0x482511,this[_0x324e77(0x196)]=_0x5b04bc;}async['del'](_0xfc3846){var _0x46911d=a4_0x76c570;return await this['cache'][_0x46911d(0x199)](this[_0x46911d(0x196)]+':'+_0xfc3846);}async[a4_0x76c570(0x191)](_0x113719,_0x547a33,_0xc7b2ef){var _0x500fb1=a4_0x76c570;return await this[_0x500fb1(0x174)][_0x500fb1(0x191)](this[_0x500fb1(0x196)]+':'+_0x113719,_0x547a33,_0xc7b2ef);}async['get'](_0x4fc77d,_0x129aa3){return new Promise((_0x2b1fc0,_0x278fe1)=>{var _0x4428fc=a4_0xa8fd;this[_0x4428fc(0x174)][_0x4428fc(0x18e)](this[_0x4428fc(0x196)]+':'+_0x4fc77d,(_0x341af4,_0x6a8cbd)=>{_0x341af4?_0x278fe1(_0x341af4):_0x2b1fc0(_0x6a8cbd||_0x129aa3);});});}async[a4_0x76c570(0x185)](_0x3e2a79,_0x5bef64){var _0x3fec88=a4_0x76c570;return await this[_0x3fec88(0x199)](_0x3e2a79+'-'+_0x5bef64);}async[a4_0x76c570(0x17d)](_0x57099a,_0x3627bb,_0x4e3949,_0x19a34d){return await this['set'](_0x57099a+'-'+_0x3627bb,_0x4e3949,_0x19a34d);}async['hget'](_0x118ad2,_0xcbabee,_0x55e601){var _0x205886=a4_0x76c570;return await this[_0x205886(0x18e)](_0x118ad2+'-'+_0xcbabee,_0x55e601);}}
|