@anncic-api/cache 1.0.0 → 1.0.6
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';function
|
|
1
|
+
'use strict';function a0_0x4720(){const _0x36c9a0=['appDir','1056465pArITC','memory','1330630YdmHOE','file','711816RpoTjx','4pKCeeY','595546GZfuAs','7RfWqXI','1351640EzpVSy','cache-manager-ioredis','defineProperty','name','/runtime/.cache','116847Awbjuo','18ejhUSo','85614QXjXuE','127.0.0.1'];a0_0x4720=function(){return _0x36c9a0;};return a0_0x4720();}const a0_0x20ea4f=a0_0x5b71;function a0_0x5b71(_0x50da4a,_0x225547){const _0x47208f=a0_0x4720();return a0_0x5b71=function(_0x5b71c5,_0x2b4e06){_0x5b71c5=_0x5b71c5-0x155;let _0x3d0d19=_0x47208f[_0x5b71c5];return _0x3d0d19;},a0_0x5b71(_0x50da4a,_0x225547);}(function(_0x5e0e3b,_0x1cb938){const _0x2079ed=a0_0x5b71,_0x2ed673=_0x5e0e3b();while(!![]){try{const _0x3339d6=-parseInt(_0x2079ed(0x156))/0x1*(parseInt(_0x2079ed(0x15e))/0x2)+-parseInt(_0x2079ed(0x15c))/0x3*(-parseInt(_0x2079ed(0x166))/0x4)+parseInt(_0x2079ed(0x163))/0x5+parseInt(_0x2079ed(0x15d))/0x6*(parseInt(_0x2079ed(0x155))/0x7)+-parseInt(_0x2079ed(0x165))/0x8+parseInt(_0x2079ed(0x161))/0x9+-parseInt(_0x2079ed(0x157))/0xa;if(_0x3339d6===_0x1cb938)break;else _0x2ed673['push'](_0x2ed673['shift']());}catch(_0x2798c1){_0x2ed673['push'](_0x2ed673['shift']());}}}(a0_0x4720,0x25930));Object[a0_0x20ea4f(0x159)](exports,'__esModule',{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0x20ea4f(0x158));exports['default']=_0xf1247b=>{const _0x44514e=a0_0x20ea4f;return{'cache':{'default':_0x44514e(0x164),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0xf1247b[_0x44514e(0x160)]+_0x44514e(0x15b)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x44514e(0x15f),'password':'','ttl':0x1e13380,'keyPrefix':_0xf1247b[_0x44514e(0x15a)]+':'}},'memory':{'store':_0x44514e(0x162),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x5cb44c=a1_0x2e2a;(function(_0x2f6c33,_0x2b2bf0){var _0x4cfa97=a1_0x2e2a,_0x521d3e=_0x2f6c33();while(!![]){try{var _0x4ddbd5=-parseInt(_0x4cfa97(0xb6))/0x1*(parseInt(_0x4cfa97(0xa8))/0x2)+-parseInt(_0x4cfa97(0xae))/0x3+parseInt(_0x4cfa97(0xab))/0x4*(parseInt(_0x4cfa97(0xb8))/0x5)+-parseInt(_0x4cfa97(0xaf))/0x6+-parseInt(_0x4cfa97(0xb1))/0x7+-parseInt(_0x4cfa97(0xb0))/0x8+parseInt(_0x4cfa97(0xa9))/0x9*(parseInt(_0x4cfa97(0xac))/0xa);if(_0x4ddbd5===_0x2b2bf0)break;else _0x521d3e['push'](_0x521d3e['shift']());}catch(_0xf5937c){_0x521d3e['push'](_0x521d3e['shift']());}}}(a1_0xe96e,0x2a635));var __decorate=this&&this[a1_0x5cb44c(0xb5)]||function(_0x1ae392,_0x15eb0f,_0x4c4baf,_0x453bbf){var _0x446eca=a1_0x5cb44c,_0x371850=arguments['length'],_0xd8b896=_0x371850<0x3?_0x15eb0f:_0x453bbf===null?_0x453bbf=Object['getOwnPropertyDescriptor'](_0x15eb0f,_0x4c4baf):_0x453bbf,_0x25ca13;if(typeof Reflect===_0x446eca(0xad)&&typeof Reflect[_0x446eca(0xb3)]==='function')_0xd8b896=Reflect['decorate'](_0x1ae392,_0x15eb0f,_0x4c4baf,_0x453bbf);else{for(var _0x132051=_0x1ae392['length']-0x1;_0x132051>=0x0;_0x132051--)if(_0x25ca13=_0x1ae392[_0x132051])_0xd8b896=(_0x371850<0x3?_0x25ca13(_0xd8b896):_0x371850>0x3?_0x25ca13(_0x15eb0f,_0x4c4baf,_0xd8b896):_0x25ca13(_0x15eb0f,_0x4c4baf))||_0xd8b896;}return _0x371850>0x3&&_0xd8b896&&Object[_0x446eca(0xb7)](_0x15eb0f,_0x4c4baf,_0xd8b896),_0xd8b896;};function a1_0xe96e(){var _0x385ed1=['10aDZCZB','object','612963BeFfTO','578448awcefg','2728192OOokOE','1028153ivERjp','./config/config.default','decorate','@midwayjs/decorator','__decorate','95YzLMmy','defineProperty','5NumjTc','2424psqXZZ','7741530HVzusd','CustomConfiguration','868892YFNxnf'];a1_0xe96e=function(){return _0x385ed1;};return a1_0xe96e();}function a1_0x2e2a(_0x101d46,_0x42d47a){var _0xe96e6c=a1_0xe96e();return a1_0x2e2a=function(_0x2e2a1d,_0x56db2c){_0x2e2a1d=_0x2e2a1d-0xa8;var _0x35310d=_0xe96e6c[_0x2e2a1d];return _0x35310d;},a1_0x2e2a(_0x101d46,_0x42d47a);}Object[a1_0x5cb44c(0xb7)](exports,'__esModule',{'value':!![]}),exports[a1_0x5cb44c(0xaa)]=void 0x0;const decorator_1=require(a1_0x5cb44c(0xb4)),ConfigDefault=require(a1_0x5cb44c(0xb2));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'conflictCheck':![],'namespace':'anncic-api:cache','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x5cb44c(0xaa)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x22875e=a2_0x2570;function a2_0x2570(_0x915dea,_0x39a94d){const _0x545183=a2_0x5451();return a2_0x2570=function(_0x25703e,_0x15bcc6){_0x25703e=_0x25703e-0xa1;let _0x42f6f8=_0x545183[_0x25703e];return _0x42f6f8;},a2_0x2570(_0x915dea,_0x39a94d);}(function(_0x2468c6,_0x5879b4){const _0x4e475b=a2_0x2570,_0x86dc4e=_0x2468c6();while(!![]){try{const _0x361b73=-parseInt(_0x4e475b(0xae))/0x1+-parseInt(_0x4e475b(0xac))/0x2*(-parseInt(_0x4e475b(0xb6))/0x3)+parseInt(_0x4e475b(0xb4))/0x4*(-parseInt(_0x4e475b(0xa8))/0x5)+parseInt(_0x4e475b(0xb1))/0x6+-parseInt(_0x4e475b(0xb7))/0x7+-parseInt(_0x4e475b(0xa5))/0x8+parseInt(_0x4e475b(0xaf))/0x9;if(_0x361b73===_0x5879b4)break;else _0x86dc4e['push'](_0x86dc4e['shift']());}catch(_0x2ff6e1){_0x86dc4e['push'](_0x86dc4e['shift']());}}}(a2_0x5451,0xbe11e));Object['defineProperty'](exports,a2_0x22875e(0xab),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x22875e(0xaa)),CacheService_1=require(a2_0x22875e(0xb0)),core_1=require('@midwayjs/core');function Cache(_0xaefdd8,_0x3db17d){return(_0x3aef10,_0x3feb53,_0x3d6167)=>{const _0x147c47=a2_0x2570,_0x289b3b=_0x3d6167[_0x147c47(0xa7)];return _0x3d6167[_0x147c47(0xa7)]=async function(..._0x298a4c){const _0x10e120=_0x147c47;!_0xaefdd8&&(_0xaefdd8=(0x0,crypto_js_1[_0x10e120(0xb3)])(JSON['stringify'](_0x298a4c))['toString']());let _0x574e20=await this[core_1[_0x10e120(0xb2)]][_0x10e120(0xa2)][_0x10e120(0xa3)]()['getAsync'](CacheService_1['CacheService']),_0x353fec=await _0x574e20['use']('MethodDecorator')[_0x10e120(0xa1)](_0xaefdd8);if(_0x353fec)return JSON['parse'](_0x353fec);else _0x353fec=await _0x289b3b[_0x10e120(0xa6)](this,[..._0x298a4c]),await _0x574e20[_0x10e120(0xad)](_0x10e120(0xa4))['set'](_0xaefdd8,JSON[_0x10e120(0xb5)](_0x353fec),_0x3db17d);return _0x353fec;},_0x3d6167;};}exports[a2_0x22875e(0xa9)]=Cache;function a2_0x5451(){const _0x5534c2=['app','getApplicationContext','MethodDecorator','9421336zsWdan','apply','value','100YndAdK','Cache','crypto-js','__esModule','144DueDSZ','use','835074URNWzn','42998580WyIger','../service/CacheService','2254230gDtSHx','REQUEST_OBJ_CTX_KEY','MD5','281104obyjHD','stringify','22782LCJVbt','10523142texHja','get'];a2_0x5451=function(){return _0x5534c2;};return a2_0x5451();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x1144c2=a3_0x5cbe;(function(_0x486b05,_0x36a595){var _0x377ca7=a3_0x5cbe,_0x2dd609=_0x486b05();while(!![]){try{var _0x5cba81=parseInt(_0x377ca7(0x13a))/0x1+parseInt(_0x377ca7(0x140))/0x2+parseInt(_0x377ca7(0x136))/0x3*(parseInt(_0x377ca7(0x141))/0x4)+-parseInt(_0x377ca7(0x131))/0x5*(parseInt(_0x377ca7(0x13e))/0x6)+parseInt(_0x377ca7(0x139))/0x7+-parseInt(_0x377ca7(0x133))/0x8*(parseInt(_0x377ca7(0x134))/0x9)+parseInt(_0x377ca7(0x138))/0xa;if(_0x5cba81===_0x36a595)break;else _0x2dd609['push'](_0x2dd609['shift']());}catch(_0x260f7a){_0x2dd609['push'](_0x2dd609['shift']());}}}(a3_0x3609,0x2b78c));Object[a3_0x1144c2(0x13c)](exports,'__esModule',{'value':!![]}),exports[a3_0x1144c2(0x135)]=exports['Cache']=exports[a3_0x1144c2(0x130)]=void 0x0;var configuration_1=require(a3_0x1144c2(0x13b));Object[a3_0x1144c2(0x13c)](exports,a3_0x1144c2(0x130),{'enumerable':!![],'get':function(){var _0x3916fd=a3_0x1144c2;return configuration_1[_0x3916fd(0x13f)];}});function a3_0x5cbe(_0x422a1e,_0x1577bc){var _0x36090b=a3_0x3609();return a3_0x5cbe=function(_0x5cbec2,_0x5a8690){_0x5cbec2=_0x5cbec2-0x130;var _0x59b283=_0x36090b[_0x5cbec2];return _0x59b283;},a3_0x5cbe(_0x422a1e,_0x1577bc);}var Cache_1=require(a3_0x1144c2(0x13d));function a3_0x3609(){var _0x3a1e98=['375210XloUKu','1240498MBODnp','184192tmwMMI','./configuration','defineProperty','./decorator/Cache','431508kgrlMe','CustomConfiguration','305806fZxsfm','20NqaKkT','Configuration','20fOdlfQ','Cache','1457464DyzAJu','9sSjMTg','CacheService','57651DTbmaq','./service/CacheService'];a3_0x3609=function(){return _0x3a1e98;};return a3_0x3609();}Object['defineProperty'](exports,'Cache',{'enumerable':!![],'get':function(){var _0x1c33a8=a3_0x1144c2;return Cache_1[_0x1c33a8(0x132)];}});var CacheService_1=require(a3_0x1144c2(0x137));Object['defineProperty'](exports,'CacheService',{'enumerable':!![],'get':function(){var _0x76ee6e=a3_0x1144c2;return CacheService_1[_0x76ee6e(0x135)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x200c54=a4_0x4483;function a4_0x4483(_0x4d79f7,_0x2b542e){var _0x4bb03a=a4_0x4bb0();return a4_0x4483=function(_0x4483a0,_0x142131){_0x4483a0=_0x4483a0-0xbf;var _0x3fa09d=_0x4bb03a[_0x4483a0];return _0x3fa09d;},a4_0x4483(_0x4d79f7,_0x2b542e);}function a4_0x4bb0(){var _0x1623c4=['948vAKtFy','function','metadata','CacheService','3490aruavq','default','prototype','prefix','@midwayjs/decorator','ScopeEnum','options','use','__decorate','1583351zILykN','272uNxYfs','3532FeGpLf','176YZOrjR','stores','store','defineProperty','hset','config','38088ZIJRvr','Scope','get','Config','design:type','hget','cache','157560nekqZM','__esModule','119873TRolrb','getOwnPropertyDescriptor','cache-manager','reset','object','195HmgcBr','1aqCTCm','decorate','820904OgQBbI','clients','caching','3846WphqrJ','set','file','length','del'];a4_0x4bb0=function(){return _0x1623c4;};return a4_0x4bb0();}(function(_0x12f251,_0x14a602){var _0x46180c=a4_0x4483,_0x2e28d4=_0x12f251();while(!![]){try{var _0x3302d4=-parseInt(_0x46180c(0xe8))/0x1*(parseInt(_0x46180c(0xea))/0x2)+parseInt(_0x46180c(0xe7))/0x3*(parseInt(_0x46180c(0xd2))/0x4)+-parseInt(_0x46180c(0xc7))/0x5*(parseInt(_0x46180c(0xed))/0x6)+parseInt(_0x46180c(0xd0))/0x7+-parseInt(_0x46180c(0xd1))/0x8*(parseInt(_0x46180c(0xd9))/0x9)+-parseInt(_0x46180c(0xe0))/0xa*(-parseInt(_0x46180c(0xd3))/0xb)+-parseInt(_0x46180c(0xc3))/0xc*(-parseInt(_0x46180c(0xe2))/0xd);if(_0x3302d4===_0x14a602)break;else _0x2e28d4['push'](_0x2e28d4['shift']());}catch(_0x22a6c6){_0x2e28d4['push'](_0x2e28d4['shift']());}}}(a4_0x4bb0,0x400f1));var __decorate=this&&this[a4_0x200c54(0xcf)]||function(_0x50ef89,_0x27b171,_0x5e5940,_0x12a404){var _0x1801ce=a4_0x200c54,_0x4cc199=arguments[_0x1801ce(0xc1)],_0x335235=_0x4cc199<0x3?_0x27b171:_0x12a404===null?_0x12a404=Object[_0x1801ce(0xe3)](_0x27b171,_0x5e5940):_0x12a404,_0x5bf05e;if(typeof Reflect==='object'&&typeof Reflect[_0x1801ce(0xe9)]===_0x1801ce(0xc4))_0x335235=Reflect[_0x1801ce(0xe9)](_0x50ef89,_0x27b171,_0x5e5940,_0x12a404);else{for(var _0x2cfaa9=_0x50ef89[_0x1801ce(0xc1)]-0x1;_0x2cfaa9>=0x0;_0x2cfaa9--)if(_0x5bf05e=_0x50ef89[_0x2cfaa9])_0x335235=(_0x4cc199<0x3?_0x5bf05e(_0x335235):_0x4cc199>0x3?_0x5bf05e(_0x27b171,_0x5e5940,_0x335235):_0x5bf05e(_0x27b171,_0x5e5940))||_0x335235;}return _0x4cc199>0x3&&_0x335235&&Object[_0x1801ce(0xd6)](_0x27b171,_0x5e5940,_0x335235),_0x335235;},__metadata=this&&this['__metadata']||function(_0x1a00f1,_0x5cccbe){var _0x1c75f3=a4_0x200c54;if(typeof Reflect===_0x1c75f3(0xe6)&&typeof Reflect[_0x1c75f3(0xc5)]==='function')return Reflect['metadata'](_0x1a00f1,_0x5cccbe);};Object[a4_0x200c54(0xd6)](exports,a4_0x200c54(0xe1),{'value':!![]}),exports[a4_0x200c54(0xc6)]=void 0x0;const cacheManager=require(a4_0x200c54(0xe4)),decorator_1=require(a4_0x200c54(0xcb));let CacheService=class CacheService{constructor(){var _0x4fdb49=a4_0x200c54;this[_0x4fdb49(0xdf)]=undefined,this['clients']=new Map();}[a4_0x200c54(0xce)](_0x294e58){var _0x413743=a4_0x200c54,_0x545bab,_0x4970b3;if(!this[_0x413743(0xdf)]){const _0x733eac=((_0x545bab=this[_0x413743(0xd8)][_0x413743(0xd4)])===null||_0x545bab===void 0x0?void 0x0:_0x545bab[(_0x4970b3=this[_0x413743(0xd8)][_0x413743(0xdf)])===null||_0x4970b3===void 0x0?void 0x0:_0x4970b3[_0x413743(0xc8)]])||this[_0x413743(0xd8)][_0x413743(0xd4)][_0x413743(0xc0)];this[_0x413743(0xdf)]=cacheManager[_0x413743(0xec)]({..._0x733eac[_0x413743(0xcd)],'store':_0x733eac[_0x413743(0xd5)]});}return!this[_0x413743(0xeb)]['has'](_0x294e58)&&this[_0x413743(0xeb)][_0x413743(0xbf)](_0x294e58,new CacheHandler(_0x294e58,this[_0x413743(0xdf)])),this['clients'][_0x413743(0xdb)](_0x294e58);}async[a4_0x200c54(0xe5)](){var _0x17af08=a4_0x200c54;return await this[_0x17af08(0xdf)][_0x17af08(0xe5)]();}};__decorate([(0x0,decorator_1[a4_0x200c54(0xdc)])(a4_0x200c54(0xdf)),__metadata(a4_0x200c54(0xdd),Object)],CacheService[a4_0x200c54(0xc9)],'config',void 0x0),CacheService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1[a4_0x200c54(0xda)])(decorator_1[a4_0x200c54(0xcc)]['Singleton'])],CacheService),exports['CacheService']=CacheService;class CacheHandler{constructor(_0x2c7fb7,_0x331c25){var _0x3021cb=a4_0x200c54;this[_0x3021cb(0xdf)]=_0x331c25,this[_0x3021cb(0xca)]=_0x2c7fb7;}async[a4_0x200c54(0xc2)](_0x3b123b){var _0x4c5593=a4_0x200c54;return await this[_0x4c5593(0xdf)]['del'](this[_0x4c5593(0xca)]+':'+_0x3b123b);}async['set'](_0xb75ef1,_0xecf58e,_0x3503f9){var _0x1d6836=a4_0x200c54;return await this[_0x1d6836(0xdf)][_0x1d6836(0xbf)](this[_0x1d6836(0xca)]+':'+_0xb75ef1,_0xecf58e,_0x3503f9);}async[a4_0x200c54(0xdb)](_0x5c5285,_0x48718f){return new Promise((_0x5dcc8d,_0x4837f7)=>{var _0x2b59df=a4_0x4483;this[_0x2b59df(0xdf)]['get'](this['prefix']+':'+_0x5c5285,(_0x75ff7d,_0x1c314e)=>{_0x75ff7d?_0x4837f7(_0x75ff7d):_0x5dcc8d(_0x1c314e||_0x48718f);});});}async['hdel'](_0x30ac0a,_0x677f3c){var _0x134d32=a4_0x200c54;return await this[_0x134d32(0xc2)](_0x30ac0a+'-'+_0x677f3c);}async[a4_0x200c54(0xd7)](_0x3f944a,_0x85ca4e,_0x5e27ae,_0x3c9317){var _0x106c8d=a4_0x200c54;return await this[_0x106c8d(0xbf)](_0x3f944a+'-'+_0x85ca4e,_0x5e27ae,_0x3c9317);}async[a4_0x200c54(0xde)](_0x155e41,_0x5f2e88,_0x11914b){return await this['get'](_0x155e41+'-'+_0x5f2e88,_0x11914b);}}
|