@anncic-api/cache 1.4.2 → 1.4.4
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';const a0_0x114f3f=a0_0x17cc;function a0_0x38e5(){const _0x42b6eb=['defineProperty','file','memory','__esModule','default','68066LgCGEM','cache-manager-ioredis','/runtime/.cache','546625WuHqnF','427555ENvJOq','1609926wRwmHI','2544892zePkUx','127.0.0.1','1323772cHGGfX','2095448dQNzJW','3MUcBlI'];a0_0x38e5=function(){return _0x42b6eb;};return a0_0x38e5();}(function(_0x4f3344,_0x49f14c){const _0x2e135a=a0_0x17cc,_0x27c7b1=_0x4f3344();while(!![]){try{const _0x3305a5=parseInt(_0x2e135a(0x1a8))/0x1+-parseInt(_0x2e135a(0x1a4))/0x2+parseInt(_0x2e135a(0x1ae))/0x3*(parseInt(_0x2e135a(0x1ac))/0x4)+-parseInt(_0x2e135a(0x1a7))/0x5+-parseInt(_0x2e135a(0x1a9))/0x6+-parseInt(_0x2e135a(0x1aa))/0x7+parseInt(_0x2e135a(0x1ad))/0x8;if(_0x3305a5===_0x49f14c)break;else _0x27c7b1['push'](_0x27c7b1['shift']());}catch(_0x33b6a7){_0x27c7b1['push'](_0x27c7b1['shift']());}}}(a0_0x38e5,0x3bdca));function a0_0x17cc(_0x35ae61,_0x53d276){const _0x38e5aa=a0_0x38e5();return a0_0x17cc=function(_0x17cc31,_0x43a647){_0x17cc31=_0x17cc31-0x19f;let _0x502202=_0x38e5aa[_0x17cc31];return _0x502202;},a0_0x17cc(_0x35ae61,_0x53d276);}Object[a0_0x114f3f(0x19f)](exports,a0_0x114f3f(0x1a2),{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0x114f3f(0x1a5));exports[a0_0x114f3f(0x1a3)]=_0x584e7a=>{const _0x79f69a=a0_0x114f3f;return{'cache':{'default':_0x79f69a(0x1a0),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x584e7a['appDir']+_0x79f69a(0x1a6)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x79f69a(0x1ab),'password':'','ttl':0x1e13380,'keyPrefix':_0x584e7a['name']+':'}},'memory':{'store':_0x79f69a(0x1a1),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x52240b=a1_0x1faf;(function(_0xb4ac8d,_0x491b45){var _0x46dbe3=a1_0x1faf,_0x4a9677=_0xb4ac8d();while(!![]){try{var _0x169bd6=parseInt(_0x46dbe3(0x181))/0x1+-parseInt(_0x46dbe3(0x17f))/0x2+-parseInt(_0x46dbe3(0x179))/0x3+-parseInt(_0x46dbe3(0x184))/0x4+parseInt(_0x46dbe3(0x174))/0x5+parseInt(_0x46dbe3(0x175))/0x6*(parseInt(_0x46dbe3(0x17c))/0x7)+-parseInt(_0x46dbe3(0x176))/0x8*(-parseInt(_0x46dbe3(0x185))/0x9);if(_0x169bd6===_0x491b45)break;else _0x4a9677['push'](_0x4a9677['shift']());}catch(_0x4fd809){_0x4a9677['push'](_0x4a9677['shift']());}}}(a1_0x1c4e,0x60fa3));var __decorate=this&&this[a1_0x52240b(0x183)]||function(_0x45554b,_0x4e26b5,_0x589b69,_0x5489d0){var _0x2ff012=a1_0x52240b,_0x20b2cd=arguments['length'],_0x41ebcf=_0x20b2cd<0x3?_0x4e26b5:_0x5489d0===null?_0x5489d0=Object['getOwnPropertyDescriptor'](_0x4e26b5,_0x589b69):_0x5489d0,_0x246edd;if(typeof Reflect===_0x2ff012(0x180)&&typeof Reflect[_0x2ff012(0x178)]==='function')_0x41ebcf=Reflect[_0x2ff012(0x178)](_0x45554b,_0x4e26b5,_0x589b69,_0x5489d0);else{for(var _0x503f41=_0x45554b['length']-0x1;_0x503f41>=0x0;_0x503f41--)if(_0x246edd=_0x45554b[_0x503f41])_0x41ebcf=(_0x20b2cd<0x3?_0x246edd(_0x41ebcf):_0x20b2cd>0x3?_0x246edd(_0x4e26b5,_0x589b69,_0x41ebcf):_0x246edd(_0x4e26b5,_0x589b69))||_0x41ebcf;}return _0x20b2cd>0x3&&_0x41ebcf&&Object[_0x2ff012(0x17b)](_0x4e26b5,_0x589b69,_0x41ebcf),_0x41ebcf;};function a1_0x1c4e(){var _0x4c08f4=['858832ITcshf','5319603XvvYSo','16015WYsAti','30kMIgAP','8ZdFQpv','CustomConfiguration','decorate','990021Cniuat','@midwayjs/core','defineProperty','571298HBycJV','./config/config.default','Configuration','852106emXWAU','object','365647gzHuUl','anncic-api:cache','__decorate'];a1_0x1c4e=function(){return _0x4c08f4;};return a1_0x1c4e();}function a1_0x1faf(_0xee71b1,_0x28d775){var _0x1c4ed2=a1_0x1c4e();return a1_0x1faf=function(_0x1faf72,_0x4fe212){_0x1faf72=_0x1faf72-0x174;var _0x459cca=_0x1c4ed2[_0x1faf72];return _0x459cca;},a1_0x1faf(_0xee71b1,_0x28d775);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a1_0x52240b(0x177)]=void 0x0;const core_1=require(a1_0x52240b(0x17a)),ConfigDefault=require(a1_0x52240b(0x17d));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,core_1[a1_0x52240b(0x17e)])({'conflictCheck':![],'namespace':a1_0x52240b(0x182),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x52240b(0x177)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a2_0x4606(_0x36a683,_0x3a87f3){const _0xd4cedf=a2_0xd4ce();return a2_0x4606=function(_0x4606c3,_0x555d9e){_0x4606c3=_0x4606c3-0x160;let _0x176308=_0xd4cedf[_0x4606c3];return _0x176308;},a2_0x4606(_0x36a683,_0x3a87f3);}const a2_0x3cbd98=a2_0x4606;function a2_0xd4ce(){const _0x16fcac=['847116CjTSui','REQUEST_OBJ_CTX_KEY','stringify','1783278CpBAVm','Method::Decorator','CacheService','defineProperty','parse','set','1413783ftZaAE','10735aWoYnF','getApplicationContext','value','Cache','use','78pjePUC','507515wxKlDI','__esModule','4802850DvrdVw','@midwayjs/core','88kTANYS','get','8714230hZPMSl','crypto-js'];a2_0xd4ce=function(){return _0x16fcac;};return a2_0xd4ce();}(function(_0x2659da,_0x50a24a){const _0x1487d8=a2_0x4606,_0x20d880=_0x2659da();while(!![]){try{const _0x7680ce=-parseInt(_0x1487d8(0x165))/0x1*(-parseInt(_0x1487d8(0x16a))/0x2)+parseInt(_0x1487d8(0x164))/0x3+-parseInt(_0x1487d8(0x173))/0x4+-parseInt(_0x1487d8(0x16b))/0x5+-parseInt(_0x1487d8(0x16d))/0x6+-parseInt(_0x1487d8(0x171))/0x7+parseInt(_0x1487d8(0x16f))/0x8*(parseInt(_0x1487d8(0x176))/0x9);if(_0x7680ce===_0x50a24a)break;else _0x20d880['push'](_0x20d880['shift']());}catch(_0x48bd13){_0x20d880['push'](_0x20d880['shift']());}}}(a2_0xd4ce,0xad8b9));Object[a2_0x3cbd98(0x161)](exports,a2_0x3cbd98(0x16c),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x3cbd98(0x172)),CacheService_1=require('../service/CacheService'),core_1=require(a2_0x3cbd98(0x16e));function Cache(_0x68c760,_0x54259e){return(_0x179482,_0x2fc231,_0x42c227)=>{const _0x523837=a2_0x4606,_0x4719cc=_0x42c227['value'];return _0x42c227[_0x523837(0x167)]=async function(..._0x5bf696){const _0x38ffa3=_0x523837;!_0x68c760&&(_0x68c760=(0x0,crypto_js_1['MD5'])(JSON[_0x38ffa3(0x175)](_0x5bf696))['toString']());let _0x2a01e8=await this[core_1[_0x38ffa3(0x174)]]['app'][_0x38ffa3(0x166)]()['getAsync'](CacheService_1[_0x38ffa3(0x160)]),_0x3f3fe4=await _0x2a01e8[_0x38ffa3(0x169)](_0x38ffa3(0x177))[_0x38ffa3(0x170)](_0x68c760);if(_0x3f3fe4)return JSON[_0x38ffa3(0x162)](_0x3f3fe4);else _0x3f3fe4=await _0x4719cc['apply'](this,[..._0x5bf696]),await _0x2a01e8[_0x38ffa3(0x169)](_0x38ffa3(0x177))[_0x38ffa3(0x163)](_0x68c760,JSON[_0x38ffa3(0x175)](_0x3f3fe4),_0x54259e);return _0x3f3fe4;},_0x42c227;};}exports[a2_0x3cbd98(0x168)]=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a3_0xb4a2(_0x370b9f,_0x5eee09){var _0x2b36b8=a3_0x2b36();return a3_0xb4a2=function(_0xb4a2a4,_0x4d8e3f){_0xb4a2a4=_0xb4a2a4-0x75;var _0x51d394=_0x2b36b8[_0xb4a2a4];return _0x51d394;},a3_0xb4a2(_0x370b9f,_0x5eee09);}var a3_0x48874c=a3_0xb4a2;(function(_0x565d9e,_0x299d57){var _0x412041=a3_0xb4a2,_0x395014=_0x565d9e();while(!![]){try{var _0x5d752c=parseInt(_0x412041(0x81))/0x1*(parseInt(_0x412041(0x85))/0x2)+parseInt(_0x412041(0x82))/0x3*(parseInt(_0x412041(0x7d))/0x4)+parseInt(_0x412041(0x7e))/0x5*(-parseInt(_0x412041(0x83))/0x6)+parseInt(_0x412041(0x84))/0x7*(-parseInt(_0x412041(0x7a))/0x8)+-parseInt(_0x412041(0x77))/0x9*(parseInt(_0x412041(0x86))/0xa)+parseInt(_0x412041(0x78))/0xb+-parseInt(_0x412041(0x7b))/0xc;if(_0x5d752c===_0x299d57)break;else _0x395014['push'](_0x395014['shift']());}catch(_0x5be3c8){_0x395014['push'](_0x395014['shift']());}}}(a3_0x2b36,0xa7c5b));Object[a3_0x48874c(0x79)](exports,a3_0x48874c(0x76),{'value':!![]}),exports['CacheService']=exports['Cache']=exports[a3_0x48874c(0x87)]=void 0x0;var configuration_1=require('./configuration');Object[a3_0x48874c(0x79)](exports,a3_0x48874c(0x87),{'enumerable':!![],'get':function(){var _0x181c5a=a3_0x48874c;return configuration_1[_0x181c5a(0x7c)];}});var Cache_1=require(a3_0x48874c(0x75));function a3_0x2b36(){var _0x5519ea=['665649GwAlhH','2964WqhGSD','6YmLrrs','3808FVhEre','4sKwjSm','400070rDdtJt','Configuration','Cache','./decorator/Cache','__esModule','9srUMmN','5051101oxbLnk','defineProperty','19000UAXhlf','32640YtcNaE','CustomConfiguration','2144FQRrON','1490675CEfiBP','./service/CacheService','CacheService'];a3_0x2b36=function(){return _0x5519ea;};return a3_0x2b36();}Object[a3_0x48874c(0x79)](exports,a3_0x48874c(0x88),{'enumerable':!![],'get':function(){var _0x47c0af=a3_0x48874c;return Cache_1[_0x47c0af(0x88)];}});var CacheService_1=require(a3_0x48874c(0x7f));Object[a3_0x48874c(0x79)](exports,a3_0x48874c(0x80),{'enumerable':!![],'get':function(){var _0x4eb294=a3_0x48874c;return CacheService_1[_0x4eb294(0x80)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x1ea317=a4_0x162f;(function(_0xda5e3f,_0x3fb81e){var _0x2842d8=a4_0x162f,_0x2ea6ec=_0xda5e3f();while(!![]){try{var _0x11a436=parseInt(_0x2842d8(0xf9))/0x1*(parseInt(_0x2842d8(0x10a))/0x2)+-parseInt(_0x2842d8(0xf0))/0x3+-parseInt(_0x2842d8(0xf2))/0x4*(-parseInt(_0x2842d8(0xe9))/0x5)+-parseInt(_0x2842d8(0xfb))/0x6*(-parseInt(_0x2842d8(0x107))/0x7)+-parseInt(_0x2842d8(0x104))/0x8+-parseInt(_0x2842d8(0xf7))/0x9+parseInt(_0x2842d8(0x100))/0xa*(parseInt(_0x2842d8(0x105))/0xb);if(_0x11a436===_0x3fb81e)break;else _0x2ea6ec['push'](_0x2ea6ec['shift']());}catch(_0x45bcdd){_0x2ea6ec['push'](_0x2ea6ec['shift']());}}}(a4_0x4fc4,0x9635a));var __decorate=this&&this['__decorate']||function(_0x9d3e93,_0x478707,_0xfe0770,_0x41f2c8){var _0x2df4e2=a4_0x162f,_0x2dc975=arguments[_0x2df4e2(0xe5)],_0x2d66dc=_0x2dc975<0x3?_0x478707:_0x41f2c8===null?_0x41f2c8=Object[_0x2df4e2(0xfa)](_0x478707,_0xfe0770):_0x41f2c8,_0x1add81;if(typeof Reflect===_0x2df4e2(0xfc)&&typeof Reflect[_0x2df4e2(0xed)]===_0x2df4e2(0x101))_0x2d66dc=Reflect[_0x2df4e2(0xed)](_0x9d3e93,_0x478707,_0xfe0770,_0x41f2c8);else{for(var _0x1ae360=_0x9d3e93['length']-0x1;_0x1ae360>=0x0;_0x1ae360--)if(_0x1add81=_0x9d3e93[_0x1ae360])_0x2d66dc=(_0x2dc975<0x3?_0x1add81(_0x2d66dc):_0x2dc975>0x3?_0x1add81(_0x478707,_0xfe0770,_0x2d66dc):_0x1add81(_0x478707,_0xfe0770))||_0x2d66dc;}return _0x2dc975>0x3&&_0x2d66dc&&Object['defineProperty'](_0x478707,_0xfe0770,_0x2d66dc),_0x2d66dc;},__metadata=this&&this[a4_0x1ea317(0x10c)]||function(_0x1bcaef,_0x238b48){var _0x435222=a4_0x1ea317;if(typeof Reflect===_0x435222(0xfc)&&typeof Reflect['metadata']===_0x435222(0x101))return Reflect['metadata'](_0x1bcaef,_0x238b48);};Object[a4_0x1ea317(0xf8)](exports,a4_0x1ea317(0xee),{'value':!![]}),exports['CacheService']=void 0x0;const cacheManager=require(a4_0x1ea317(0x106)),core_1=require(a4_0x1ea317(0xeb));function a4_0x162f(_0x23c5fb,_0x1e87c2){var _0x4fc461=a4_0x4fc4();return a4_0x162f=function(_0x162f26,_0x55ccf7){_0x162f26=_0x162f26-0xe5;var _0x5c4c82=_0x4fc461[_0x162f26];return _0x5c4c82;},a4_0x162f(_0x23c5fb,_0x1e87c2);}let CacheService=class CacheService{constructor(){this['cache']=undefined,this['clients']=new Map();}[a4_0x1ea317(0xf3)](_0x532ce0){var _0x4f9473=a4_0x1ea317,_0x450b26,_0x3d7117;if(!this[_0x4f9473(0xf1)]){const _0x7606a1=((_0x450b26=this[_0x4f9473(0xe8)][_0x4f9473(0xff)])===null||_0x450b26===void 0x0?void 0x0:_0x450b26[(_0x3d7117=this[_0x4f9473(0xe8)]['cache'])===null||_0x3d7117===void 0x0?void 0x0:_0x3d7117['default']])||this[_0x4f9473(0xe8)][_0x4f9473(0xff)][_0x4f9473(0xf4)];this[_0x4f9473(0xf1)]=cacheManager[_0x4f9473(0xe6)]({..._0x7606a1['options'],'store':_0x7606a1['store']});}return!this[_0x4f9473(0xfe)][_0x4f9473(0x10d)](_0x532ce0)&&this['clients'][_0x4f9473(0xfd)](_0x532ce0,new CacheHandler(_0x532ce0,this['cache'])),this['clients'][_0x4f9473(0xf6)](_0x532ce0);}async[a4_0x1ea317(0x102)](){return await this['cache']['reset']();}};__decorate([(0x0,core_1['Config'])(a4_0x1ea317(0xf1)),__metadata(a4_0x1ea317(0xe7),Object)],CacheService[a4_0x1ea317(0x108)],a4_0x1ea317(0xe8),void 0x0),CacheService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a4_0x1ea317(0xf5)])(core_1['ScopeEnum'][a4_0x1ea317(0x109)])],CacheService),exports[a4_0x1ea317(0x103)]=CacheService;function a4_0x4fc4(){var _0x128c18=['design:type','config','600IoWoto','del','@midwayjs/core','hget','decorate','__esModule','prefix','2577198pbqoJT','cache','25744ShxKgS','use','file','Scope','get','10511019pywsJL','defineProperty','3XZDYKt','getOwnPropertyDescriptor','24kgdQPN','object','set','clients','stores','10AtsyCb','function','reset','CacheService','9035304XBoBAk','29470903sHGyBE','cache-manager','412349PflZjm','prototype','Singleton','56338SjFiuy','hset','__metadata','has','length','caching'];a4_0x4fc4=function(){return _0x128c18;};return a4_0x4fc4();}class CacheHandler{constructor(_0x20ae5d,_0x5c3516){var _0x5d87d0=a4_0x1ea317;this['cache']=_0x5c3516,this[_0x5d87d0(0xef)]=_0x20ae5d;}async[a4_0x1ea317(0xea)](_0x5ed07b){var _0x13d8c3=a4_0x1ea317;return await this[_0x13d8c3(0xf1)]['del'](this[_0x13d8c3(0xef)]+':'+_0x5ed07b);}async[a4_0x1ea317(0xfd)](_0x3e22c0,_0x44833e,_0x1b08b6){var _0x5a8e93=a4_0x1ea317;return await this[_0x5a8e93(0xf1)][_0x5a8e93(0xfd)](this[_0x5a8e93(0xef)]+':'+_0x3e22c0,_0x44833e,_0x1b08b6);}async[a4_0x1ea317(0xf6)](_0x46708a,_0x59eb63){return new Promise((_0x162237,_0x3b1400)=>{var _0x2694ef=a4_0x162f;this[_0x2694ef(0xf1)][_0x2694ef(0xf6)](this['prefix']+':'+_0x46708a,(_0x4fba5b,_0x27859f)=>{_0x4fba5b?_0x3b1400(_0x4fba5b):_0x162237(_0x27859f||_0x59eb63);});});}async['hdel'](_0x3ac690,_0x5003c5){var _0x4599b5=a4_0x1ea317;return await this[_0x4599b5(0xea)](_0x3ac690+'#'+_0x5003c5);}async[a4_0x1ea317(0x10b)](_0x32c352,_0x29bd7d,_0x577647,_0x30e3cd){var _0x1ca0f1=a4_0x1ea317;return await this[_0x1ca0f1(0xfd)](_0x32c352+'#'+_0x29bd7d,_0x577647,_0x30e3cd);}async[a4_0x1ea317(0xec)](_0x5e90a5,_0x9f8e96,_0x525090){return await this['get'](_0x5e90a5+'#'+_0x9f8e96,_0x525090);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"javascript-obfuscator": "2.19.0",
|
|
24
24
|
"typescript": "^4.7.4"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "864964ba61f2a0edc08575c25cc548d2c9cad87d"
|
|
27
27
|
}
|