@anncic-api/cache 1.2.5 → 1.2.7
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_0x35a061=a0_0x3e43;(function(_0x18de8c,_0x2b8332){const _0xa049e8=a0_0x3e43,_0x851477=_0x18de8c();while(!![]){try{const _0xad92fc=parseInt(_0xa049e8(0x1f3))/0x1*(parseInt(_0xa049e8(0x205))/0x2)+parseInt(_0xa049e8(0x1f7))/0x3*(-parseInt(_0xa049e8(0x203))/0x4)+parseInt(_0xa049e8(0x1ff))/0x5+-parseInt(_0xa049e8(0x1f4))/0x6*(parseInt(_0xa049e8(0x1f8))/0x7)+-parseInt(_0xa049e8(0x206))/0x8*(-parseInt(_0xa049e8(0x204))/0x9)+-parseInt(_0xa049e8(0x1f9))/0xa*(parseInt(_0xa049e8(0x1fe))/0xb)+-parseInt(_0xa049e8(0x1fb))/0xc;if(_0xad92fc===_0x2b8332)break;else _0x851477['push'](_0x851477['shift']());}catch(_0x2d878e){_0x851477['push'](_0x851477['shift']());}}}(a0_0x3597,0x91c70));function a0_0x3e43(_0x3e8c16,_0x2c3d9e){const _0x3597c1=a0_0x3597();return a0_0x3e43=function(_0x3e4378,_0x3b2679){_0x3e4378=_0x3e4378-0x1f3;let _0x47640a=_0x3597c1[_0x3e4378];return _0x47640a;},a0_0x3e43(_0x3e8c16,_0x2c3d9e);}Object[a0_0x35a061(0x1f6)](exports,a0_0x35a061(0x208),{'value':!![]});const fsStore=require(a0_0x35a061(0x1fa)),redisStore=require(a0_0x35a061(0x1fd));exports[a0_0x35a061(0x1fc)]=_0xa05e57=>{const _0x1b8a6e=a0_0x35a061;return{'cache':{'default':'file','stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0xa05e57[_0x1b8a6e(0x202)]+_0x1b8a6e(0x1f5)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x1b8a6e(0x207),'password':'','ttl':0x1e13380,'keyPrefix':_0xa05e57[_0x1b8a6e(0x201)]+':'}},'memory':{'store':_0x1b8a6e(0x200),'options':{'max':0x64,'ttl':0x1e13380}}}}};};function a0_0x3597(){const _0x29bb3c=['127.0.0.1','__esModule','2nKNLmG','3328026iXHPXi','/runtime/.cache','defineProperty','3acRIQd','7gXBnrL','680APgLDW','cache-manager-fs-hash','2604276AAJdWn','default','cache-manager-ioredis','34485qzhsEw','5935990nrLUdh','memory','name','appDir','981332DHBIUc','27AoyROC','120936flVJPG','1384472lGovcE'];a0_0x3597=function(){return _0x29bb3c;};return a0_0x3597();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a1_0x153b(){var _0x455636=['279fMQWeO','3202146qstcyK','147772tPCCAW','451467hWBIUW','getOwnPropertyDescriptor','25aEemiZ','function','defineProperty','./config/config.default','@midwayjs/core','5201jzFpxg','6448MWYbRx','object','9702022tCSdth','15870oewmFa','122yENvrG','CustomConfiguration','7592WTJfUQ','Configuration','length','decorate'];a1_0x153b=function(){return _0x455636;};return a1_0x153b();}var a1_0x51a13f=a1_0x41d7;(function(_0x23701a,_0xfc86da){var _0x1e4baa=a1_0x41d7,_0x5bdda6=_0x23701a();while(!![]){try{var _0x1be024=-parseInt(_0x1e4baa(0x1f9))/0x1*(-parseInt(_0x1e4baa(0x1f5))/0x2)+-parseInt(_0x1e4baa(0x1ed))/0x3+parseInt(_0x1e4baa(0x1ec))/0x4*(-parseInt(_0x1e4baa(0x1ef))/0x5)+parseInt(_0x1e4baa(0x1eb))/0x6+-parseInt(_0x1e4baa(0x1f4))/0x7*(-parseInt(_0x1e4baa(0x1fb))/0x8)+parseInt(_0x1e4baa(0x1ea))/0x9*(-parseInt(_0x1e4baa(0x1f8))/0xa)+-parseInt(_0x1e4baa(0x1f7))/0xb;if(_0x1be024===_0xfc86da)break;else _0x5bdda6['push'](_0x5bdda6['shift']());}catch(_0x339d8b){_0x5bdda6['push'](_0x5bdda6['shift']());}}}(a1_0x153b,0x5949b));var __decorate=this&&this['__decorate']||function(_0x281b16,_0xa9b9f1,_0x3f6256,_0x37c50b){var _0x4a950f=a1_0x41d7,_0x100620=arguments['length'],_0xdc3768=_0x100620<0x3?_0xa9b9f1:_0x37c50b===null?_0x37c50b=Object[_0x4a950f(0x1ee)](_0xa9b9f1,_0x3f6256):_0x37c50b,_0x329ef4;if(typeof Reflect===_0x4a950f(0x1f6)&&typeof Reflect[_0x4a950f(0x1fe)]===_0x4a950f(0x1f0))_0xdc3768=Reflect[_0x4a950f(0x1fe)](_0x281b16,_0xa9b9f1,_0x3f6256,_0x37c50b);else{for(var _0x5044a8=_0x281b16[_0x4a950f(0x1fd)]-0x1;_0x5044a8>=0x0;_0x5044a8--)if(_0x329ef4=_0x281b16[_0x5044a8])_0xdc3768=(_0x100620<0x3?_0x329ef4(_0xdc3768):_0x100620>0x3?_0x329ef4(_0xa9b9f1,_0x3f6256,_0xdc3768):_0x329ef4(_0xa9b9f1,_0x3f6256))||_0xdc3768;}return _0x100620>0x3&&_0xdc3768&&Object[_0x4a950f(0x1f1)](_0xa9b9f1,_0x3f6256,_0xdc3768),_0xdc3768;};Object[a1_0x51a13f(0x1f1)](exports,'__esModule',{'value':!![]}),exports[a1_0x51a13f(0x1fa)]=void 0x0;function a1_0x41d7(_0x167ef6,_0x276472){var _0x153b04=a1_0x153b();return a1_0x41d7=function(_0x41d72b,_0x8cbba5){_0x41d72b=_0x41d72b-0x1ea;var _0x821adc=_0x153b04[_0x41d72b];return _0x821adc;},a1_0x41d7(_0x167ef6,_0x276472);}const core_1=require(a1_0x51a13f(0x1f3)),ConfigDefault=require(a1_0x51a13f(0x1f2));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,core_1[a1_0x51a13f(0x1fc)])({'conflictCheck':![],'namespace':'anncic-api:cache','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x51a13f(0x1fa)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x443a40=a2_0x354b;function a2_0x354b(_0x44fdd6,_0x1b92a8){const _0xecb0b0=a2_0xecb0();return a2_0x354b=function(_0x354ba2,_0x2e0157){_0x354ba2=_0x354ba2-0x10a;let _0x2daa47=_0xecb0b0[_0x354ba2];return _0x2daa47;},a2_0x354b(_0x44fdd6,_0x1b92a8);}(function(_0x4815ba,_0xfacb06){const _0x27192d=a2_0x354b,_0x23f78f=_0x4815ba();while(!![]){try{const _0x147416=-parseInt(_0x27192d(0x10d))/0x1*(parseInt(_0x27192d(0x121))/0x2)+parseInt(_0x27192d(0x119))/0x3*(parseInt(_0x27192d(0x10c))/0x4)+parseInt(_0x27192d(0x11d))/0x5*(parseInt(_0x27192d(0x11c))/0x6)+parseInt(_0x27192d(0x123))/0x7+-parseInt(_0x27192d(0x111))/0x8+-parseInt(_0x27192d(0x10f))/0x9*(-parseInt(_0x27192d(0x110))/0xa)+parseInt(_0x27192d(0x11e))/0xb;if(_0x147416===_0xfacb06)break;else _0x23f78f['push'](_0x23f78f['shift']());}catch(_0x35d0b4){_0x23f78f['push'](_0x23f78f['shift']());}}}(a2_0xecb0,0x7e52a));Object[a2_0x443a40(0x113)](exports,a2_0x443a40(0x115),{'value':!![]}),exports[a2_0x443a40(0x122)]=void 0x0;function a2_0xecb0(){const _0x330f95=['MethodDecorator','28VlraZk','1xJwJjs','getAsync','72BmCjDF','273610aAyYjU','5548672uuzGCo','toString','defineProperty','stringify','__esModule','value','set','CacheService','206274VTgRoE','crypto-js','apply','2615568zPnxjS','5amxMBQ','4991921xjrxid','parse','../service/CacheService','1846058gJPEQh','Cache','3808686asoZcw','getApplicationContext','use','REQUEST_OBJ_CTX_KEY'];a2_0xecb0=function(){return _0x330f95;};return a2_0xecb0();}const crypto_js_1=require(a2_0x443a40(0x11a)),CacheService_1=require(a2_0x443a40(0x120)),core_1=require('@midwayjs/core');function Cache(_0x150cfc,_0x520fe0){return(_0x42fe21,_0x4cdd31,_0x5eda0a)=>{const _0x1ad03e=a2_0x354b,_0x2cd792=_0x5eda0a[_0x1ad03e(0x116)];return _0x5eda0a['value']=async function(..._0x4ad94b){const _0xc7233d=_0x1ad03e;!_0x150cfc&&(_0x150cfc=(0x0,crypto_js_1['MD5'])(JSON[_0xc7233d(0x114)](_0x4ad94b))[_0xc7233d(0x112)]());let _0x48b7d3=await this[core_1[_0xc7233d(0x10a)]]['app'][_0xc7233d(0x124)]()[_0xc7233d(0x10e)](CacheService_1[_0xc7233d(0x118)]),_0x1a27d5=await _0x48b7d3['use']('MethodDecorator')['get'](_0x150cfc);if(_0x1a27d5)return JSON[_0xc7233d(0x11f)](_0x1a27d5);else _0x1a27d5=await _0x2cd792[_0xc7233d(0x11b)](this,[..._0x4ad94b]),await _0x48b7d3[_0xc7233d(0x125)](_0xc7233d(0x10b))[_0xc7233d(0x117)](_0x150cfc,JSON[_0xc7233d(0x114)](_0x1a27d5),_0x520fe0);return _0x1a27d5;},_0x5eda0a;};}exports['Cache']=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a3_0x525f70=a3_0x5b85;(function(_0x48f07d,_0x4b0c6c){var _0x20e035=a3_0x5b85,_0x3b41b3=_0x48f07d();while(!![]){try{var _0x2aa2fc=-parseInt(_0x20e035(0x10f))/0x1*(-parseInt(_0x20e035(0x105))/0x2)+parseInt(_0x20e035(0x104))/0x3*(-parseInt(_0x20e035(0x10c))/0x4)+-parseInt(_0x20e035(0x10d))/0x5*(-parseInt(_0x20e035(0x10b))/0x6)+parseInt(_0x20e035(0x109))/0x7+parseInt(_0x20e035(0x111))/0x8*(parseInt(_0x20e035(0x10a))/0x9)+parseInt(_0x20e035(0x101))/0xa*(-parseInt(_0x20e035(0x10e))/0xb)+-parseInt(_0x20e035(0x102))/0xc*(parseInt(_0x20e035(0xfd))/0xd);if(_0x2aa2fc===_0x4b0c6c)break;else _0x3b41b3['push'](_0x3b41b3['shift']());}catch(_0x5e4855){_0x3b41b3['push'](_0x3b41b3['shift']());}}}(a3_0x4882,0xa7bd3));function a3_0x4882(){var _0x138063=['CacheService','__esModule','4103939THvjQc','27xXGIeb','192YtDftI','4HHafdb','160880QoqnBh','108779YaGeHi','274653hWOEbR','defineProperty','2262872kfQUOi','247SktSau','Cache','CustomConfiguration','./decorator/Cache','730jLqvsH','605916YwfhZQ','Configuration','3584325PJuwWq','8fJdJpE','./configuration'];a3_0x4882=function(){return _0x138063;};return a3_0x4882();}Object['defineProperty'](exports,a3_0x525f70(0x108),{'value':!![]}),exports[a3_0x525f70(0x107)]=exports['Cache']=exports[a3_0x525f70(0x103)]=void 0x0;function a3_0x5b85(_0x14dccf,_0xa0ff37){var _0x48829c=a3_0x4882();return a3_0x5b85=function(_0x5b85d2,_0x380317){_0x5b85d2=_0x5b85d2-0xfd;var _0x4cc6b6=_0x48829c[_0x5b85d2];return _0x4cc6b6;},a3_0x5b85(_0x14dccf,_0xa0ff37);}var configuration_1=require(a3_0x525f70(0x106));Object[a3_0x525f70(0x110)](exports,a3_0x525f70(0x103),{'enumerable':!![],'get':function(){var _0x1f89d2=a3_0x525f70;return configuration_1[_0x1f89d2(0xff)];}});var Cache_1=require(a3_0x525f70(0x100));Object[a3_0x525f70(0x110)](exports,a3_0x525f70(0xfe),{'enumerable':!![],'get':function(){var _0x376a89=a3_0x525f70;return Cache_1[_0x376a89(0xfe)];}});var CacheService_1=require('./service/CacheService');Object[a3_0x525f70(0x110)](exports,a3_0x525f70(0x107),{'enumerable':!![],'get':function(){var _0x39147c=a3_0x525f70;return CacheService_1[_0x39147c(0x107)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0xc620c9=a4_0x2782;(function(_0x2191e4,_0x133cd3){var _0x11d1f1=a4_0x2782,_0x207df7=_0x2191e4();while(!![]){try{var _0x135072=-parseInt(_0x11d1f1(0xe5))/0x1*(parseInt(_0x11d1f1(0xe8))/0x2)+parseInt(_0x11d1f1(0xee))/0x3+-parseInt(_0x11d1f1(0xea))/0x4+parseInt(_0x11d1f1(0xd4))/0x5+-parseInt(_0x11d1f1(0xf1))/0x6*(parseInt(_0x11d1f1(0xe1))/0x7)+parseInt(_0x11d1f1(0xdb))/0x8+parseInt(_0x11d1f1(0xf4))/0x9;if(_0x135072===_0x133cd3)break;else _0x207df7['push'](_0x207df7['shift']());}catch(_0x3eb3d6){_0x207df7['push'](_0x207df7['shift']());}}}(a4_0x3a9c,0xcf6d9));var __decorate=this&&this[a4_0xc620c9(0xd5)]||function(_0x16a20d,_0x5208ab,_0x31f943,_0x15f7ed){var _0x37d7ad=a4_0xc620c9,_0x578893=arguments[_0x37d7ad(0xd2)],_0x14ba6d=_0x578893<0x3?_0x5208ab:_0x15f7ed===null?_0x15f7ed=Object[_0x37d7ad(0xda)](_0x5208ab,_0x31f943):_0x15f7ed,_0x410351;if(typeof Reflect===_0x37d7ad(0xeb)&&typeof Reflect['decorate']===_0x37d7ad(0xd1))_0x14ba6d=Reflect[_0x37d7ad(0xdf)](_0x16a20d,_0x5208ab,_0x31f943,_0x15f7ed);else{for(var _0x1a089f=_0x16a20d['length']-0x1;_0x1a089f>=0x0;_0x1a089f--)if(_0x410351=_0x16a20d[_0x1a089f])_0x14ba6d=(_0x578893<0x3?_0x410351(_0x14ba6d):_0x578893>0x3?_0x410351(_0x5208ab,_0x31f943,_0x14ba6d):_0x410351(_0x5208ab,_0x31f943))||_0x14ba6d;}return _0x578893>0x3&&_0x14ba6d&&Object[_0x37d7ad(0xdc)](_0x5208ab,_0x31f943,_0x14ba6d),_0x14ba6d;},__metadata=this&&this['__metadata']||function(_0x1baf78,_0x2bb12d){var _0x149b30=a4_0xc620c9;if(typeof Reflect===_0x149b30(0xeb)&&typeof Reflect['metadata']==='function')return Reflect[_0x149b30(0xde)](_0x1baf78,_0x2bb12d);};Object[a4_0xc620c9(0xdc)](exports,a4_0xc620c9(0xed),{'value':!![]}),exports[a4_0xc620c9(0xf5)]=void 0x0;const cacheManager=require(a4_0xc620c9(0xe6)),core_1=require(a4_0xc620c9(0xf2));function a4_0x3a9c(){var _0x5ea4d3=['882804ncpVUJ','object','Scope','__esModule','2479182iloXYd','prefix','set','4823982lAqxrr','@midwayjs/core','clients','7234704nnOLIU','CacheService','Config','get','function','length','del','1866075zMluQK','__decorate','reset','hset','cache','hget','getOwnPropertyDescriptor','6887424wNiiFV','defineProperty','options','metadata','decorate','stores','7BxvdWL','design:type','store','config','99007llOIvX','cache-manager','default','20rMpUaG','hdel'];a4_0x3a9c=function(){return _0x5ea4d3;};return a4_0x3a9c();}let CacheService=class CacheService{constructor(){var _0x23b412=a4_0xc620c9;this[_0x23b412(0xd8)]=undefined,this[_0x23b412(0xf3)]=new Map();}['use'](_0x5d1d4b){var _0xcf465b=a4_0xc620c9,_0x1075f9,_0x2db7d5;if(!this[_0xcf465b(0xd8)]){const _0x3879ef=((_0x1075f9=this[_0xcf465b(0xe4)][_0xcf465b(0xe0)])===null||_0x1075f9===void 0x0?void 0x0:_0x1075f9[(_0x2db7d5=this[_0xcf465b(0xe4)][_0xcf465b(0xd8)])===null||_0x2db7d5===void 0x0?void 0x0:_0x2db7d5[_0xcf465b(0xe7)]])||this[_0xcf465b(0xe4)][_0xcf465b(0xe0)]['file'];this[_0xcf465b(0xd8)]=cacheManager['caching']({..._0x3879ef[_0xcf465b(0xdd)],'store':_0x3879ef[_0xcf465b(0xe3)]});}return!this[_0xcf465b(0xf3)]['has'](_0x5d1d4b)&&this[_0xcf465b(0xf3)]['set'](_0x5d1d4b,new CacheHandler(_0x5d1d4b,this[_0xcf465b(0xd8)])),this[_0xcf465b(0xf3)][_0xcf465b(0xd0)](_0x5d1d4b);}async['reset'](){var _0x30d905=a4_0xc620c9;return await this['cache'][_0x30d905(0xd6)]();}};function a4_0x2782(_0x1d3e50,_0x3b600a){var _0x3a9c82=a4_0x3a9c();return a4_0x2782=function(_0x2782df,_0x486df4){_0x2782df=_0x2782df-0xd0;var _0x4369a1=_0x3a9c82[_0x2782df];return _0x4369a1;},a4_0x2782(_0x1d3e50,_0x3b600a);}__decorate([(0x0,core_1[a4_0xc620c9(0xf6)])('cache'),__metadata(a4_0xc620c9(0xe2),Object)],CacheService['prototype'],a4_0xc620c9(0xe4),void 0x0),CacheService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a4_0xc620c9(0xec)])(core_1['ScopeEnum']['Singleton'])],CacheService),exports[a4_0xc620c9(0xf5)]=CacheService;class CacheHandler{constructor(_0xd2d1bf,_0x414b4c){var _0x23706b=a4_0xc620c9;this[_0x23706b(0xd8)]=_0x414b4c,this[_0x23706b(0xef)]=_0xd2d1bf;}async[a4_0xc620c9(0xd3)](_0x4f986e){var _0x4e06df=a4_0xc620c9;return await this[_0x4e06df(0xd8)][_0x4e06df(0xd3)](this[_0x4e06df(0xef)]+':'+_0x4f986e);}async[a4_0xc620c9(0xf0)](_0x18b82e,_0x53e349,_0x944d92){var _0x26f0ad=a4_0xc620c9;return await this[_0x26f0ad(0xd8)][_0x26f0ad(0xf0)](this['prefix']+':'+_0x18b82e,_0x53e349,_0x944d92);}async[a4_0xc620c9(0xd0)](_0x1dcbaa,_0x34ff7e){return new Promise((_0x339226,_0x14189d)=>{var _0x471457=a4_0x2782;this[_0x471457(0xd8)][_0x471457(0xd0)](this[_0x471457(0xef)]+':'+_0x1dcbaa,(_0x151eec,_0x1fed16)=>{_0x151eec?_0x14189d(_0x151eec):_0x339226(_0x1fed16||_0x34ff7e);});});}async[a4_0xc620c9(0xe9)](_0x5f5821,_0x2c3cdf){var _0x419882=a4_0xc620c9;return await this[_0x419882(0xd3)](_0x5f5821+'-'+_0x2c3cdf);}async[a4_0xc620c9(0xd7)](_0x35498d,_0x4da23c,_0x10dd4d,_0x13471f){var _0x24e74e=a4_0xc620c9;return await this[_0x24e74e(0xf0)](_0x35498d+'-'+_0x4da23c,_0x10dd4d,_0x13471f);}async[a4_0xc620c9(0xd9)](_0x5f23a7,_0x11e3c6,_0x4ae6f7){var _0x1d465a=a4_0xc620c9;return await this[_0x1d465a(0xd0)](_0x5f23a7+'-'+_0x11e3c6,_0x4ae6f7);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
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": "eba0bc5a6ebf6d0b6fc4f297c9c5d0c4107e1fb9"
|
|
27
27
|
}
|