@anncic-api/cache 3.7.7 → 3.7.8
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
|
-
const
|
|
1
|
+
function a0_0x17b3(_0x553189,_0x16c4dd){const _0x3cf557=a0_0x3caa();return a0_0x17b3=function(_0x3680d2,_0x449ffe){_0x3680d2=_0x3680d2-0xb7;let _0x3caae6=_0x3cf557[_0x3680d2];return _0x3caae6;},a0_0x17b3(_0x553189,_0x16c4dd);}const a0_0x14f6d4=a0_0x17b3;(function(_0x42a6f0,_0x115cd6){const _0x4b86ec=a0_0x17b3,_0x4f08ad=_0x42a6f0();while(!![]){try{const _0x1219a3=parseInt(_0x4b86ec(0xba))/0x1+-parseInt(_0x4b86ec(0xbb))/0x2+parseInt(_0x4b86ec(0xc3))/0x3+-parseInt(_0x4b86ec(0xbd))/0x4*(parseInt(_0x4b86ec(0xbf))/0x5)+-parseInt(_0x4b86ec(0xc9))/0x6+-parseInt(_0x4b86ec(0xb9))/0x7*(parseInt(_0x4b86ec(0xc2))/0x8)+parseInt(_0x4b86ec(0xcb))/0x9;if(_0x1219a3===_0x115cd6)break;else _0x4f08ad['push'](_0x4f08ad['shift']());}catch(_0x44e0be){_0x4f08ad['push'](_0x4f08ad['shift']());}}}(a0_0x3caa,0x311a1));const a0_0x449ffe=(function(){let _0x7d0303=!![];return function(_0x282edb,_0x37c3d7){const _0x165ca7=_0x7d0303?function(){const _0x218bb2=a0_0x17b3;if(_0x37c3d7){const _0x5d7981=_0x37c3d7[_0x218bb2(0xbc)](_0x282edb,arguments);return _0x37c3d7=null,_0x5d7981;}}:function(){};return _0x7d0303=![],_0x165ca7;};}()),a0_0x3680d2=a0_0x449ffe(this,function(){const _0x5de9f3=a0_0x17b3;return a0_0x3680d2[_0x5de9f3(0xca)]()[_0x5de9f3(0xb8)](_0x5de9f3(0xbe))[_0x5de9f3(0xca)]()['constructor'](a0_0x3680d2)[_0x5de9f3(0xb8)](_0x5de9f3(0xbe));});a0_0x3680d2();'use strict';function a0_0x3caa(){const _0x5671d6=['9878004MTPolY','appDir','cache-manager-ioredis','search','42GHspWp','15895sOasCr','155474ZWdMqb','apply','34836OvJlin','(((.+)+)+)+$','95rVyEIr','env','127.0.0.1','505768mHdXZx','144693hwZkMl','defineProperty','file','memory','name','__esModule','2028162NDCnEc','toString'];a0_0x3caa=function(){return _0x5671d6;};return a0_0x3caa();}Object[a0_0x14f6d4(0xc4)](exports,a0_0x14f6d4(0xc8),{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0x14f6d4(0xb7));exports['default']=_0x29381c=>{const _0x123d53=a0_0x14f6d4;return{'cache':{'default':_0x123d53(0xc5),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x29381c[_0x123d53(0xcc)]+'/runtime/.cache'+((_0x29381c===null||_0x29381c===void 0x0?void 0x0:_0x29381c['env'])?'-'+_0x29381c['env']:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x123d53(0xc1),'password':'','keyPrefix':_0x29381c[_0x123d53(0xc7)]+':'+((_0x29381c===null||_0x29381c===void 0x0?void 0x0:_0x29381c[_0x123d53(0xc0)])?_0x29381c[_0x123d53(0xc0)]+':':'')}},'memory':{'store':_0x123d53(0xc6),'options':{'max':0x64}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x1c6e6b=a1_0x269d;(function(_0xa7396,_0x4c8708){var _0x1d0bc4=a1_0x269d,_0x1c5b8c=_0xa7396();while(!![]){try{var _0x2cb396=-parseInt(_0x1d0bc4(0x138))/0x1*(-parseInt(_0x1d0bc4(0x13c))/0x2)+-parseInt(_0x1d0bc4(0x140))/0x3*(parseInt(_0x1d0bc4(0x139))/0x4)+-parseInt(_0x1d0bc4(0x135))/0x5+parseInt(_0x1d0bc4(0x130))/0x6+-parseInt(_0x1d0bc4(0x12b))/0x7+parseInt(_0x1d0bc4(0x12a))/0x8*(-parseInt(_0x1d0bc4(0x134))/0x9)+-parseInt(_0x1d0bc4(0x13a))/0xa*(-parseInt(_0x1d0bc4(0x133))/0xb);if(_0x2cb396===_0x4c8708)break;else _0x1c5b8c['push'](_0x1c5b8c['shift']());}catch(_0x576d5d){_0x1c5b8c['push'](_0x1c5b8c['shift']());}}}(a1_0x4254,0xcd7ae));var a1_0x24e564=(function(){var _0x3419fd=!![];return function(_0x484d6c,_0x49e576){var _0x3db1fb=_0x3419fd?function(){if(_0x49e576){var _0x48f051=_0x49e576['apply'](_0x484d6c,arguments);return _0x49e576=null,_0x48f051;}}:function(){};return _0x3419fd=![],_0x3db1fb;};}()),a1_0x335d3e=a1_0x24e564(this,function(){var _0x879b99=a1_0x269d;return a1_0x335d3e[_0x879b99(0x12c)]()['search'](_0x879b99(0x13b))[_0x879b99(0x12c)]()[_0x879b99(0x131)](a1_0x335d3e)[_0x879b99(0x127)](_0x879b99(0x13b));});a1_0x335d3e();function a1_0x4254(){var _0x1a0d7c=['7245720xFzCDs','@midwayjs/core','defineProperty','1dtNAcR','4SCXDkJ','4570UgQNkM','(((.+)+)+)+$','1394138aYjmPb','function','length','anncic-api:cache','4942641rovHUi','__decorate','search','./config/config.default','object','592ymIYvj','6007302LThwbV','toString','CustomConfiguration','decorate','getOwnPropertyDescriptor','8286600SEpbmG','constructor','Configuration','93016lgZrGb','139383axxrpr'];a1_0x4254=function(){return _0x1a0d7c;};return a1_0x4254();}'use strict';var __decorate=this&&this[a1_0x1c6e6b(0x141)]||function(_0x37f071,_0x5ee053,_0x23b5d8,_0x4b7c2d){var _0x192266=a1_0x1c6e6b,_0x182e6b=arguments['length'],_0x1d2e3e=_0x182e6b<0x3?_0x5ee053:_0x4b7c2d===null?_0x4b7c2d=Object[_0x192266(0x12f)](_0x5ee053,_0x23b5d8):_0x4b7c2d,_0x38afd5;if(typeof Reflect===_0x192266(0x129)&&typeof Reflect[_0x192266(0x12e)]===_0x192266(0x13d))_0x1d2e3e=Reflect[_0x192266(0x12e)](_0x37f071,_0x5ee053,_0x23b5d8,_0x4b7c2d);else{for(var _0x5ae7b7=_0x37f071[_0x192266(0x13e)]-0x1;_0x5ae7b7>=0x0;_0x5ae7b7--)if(_0x38afd5=_0x37f071[_0x5ae7b7])_0x1d2e3e=(_0x182e6b<0x3?_0x38afd5(_0x1d2e3e):_0x182e6b>0x3?_0x38afd5(_0x5ee053,_0x23b5d8,_0x1d2e3e):_0x38afd5(_0x5ee053,_0x23b5d8))||_0x1d2e3e;}return _0x182e6b>0x3&&_0x1d2e3e&&Object[_0x192266(0x137)](_0x5ee053,_0x23b5d8,_0x1d2e3e),_0x1d2e3e;};Object[a1_0x1c6e6b(0x137)](exports,'__esModule',{'value':!![]}),exports[a1_0x1c6e6b(0x12d)]=void 0x0;const core_1=require(a1_0x1c6e6b(0x136)),ConfigDefault=require(a1_0x1c6e6b(0x128));let CustomConfiguration=class CustomConfiguration{};function a1_0x269d(_0x5ceb83,_0x52a633){var _0x39f40a=a1_0x4254();return a1_0x269d=function(_0x335d3e,_0x24e564){_0x335d3e=_0x335d3e-0x127;var _0x4254e2=_0x39f40a[_0x335d3e];return _0x4254e2;},a1_0x269d(_0x5ceb83,_0x52a633);}exports[a1_0x1c6e6b(0x12d)]=CustomConfiguration,exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_1[a1_0x1c6e6b(0x132)])({'conflictCheck':![],'namespace':a1_0x1c6e6b(0x13f),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x10b485=a2_0x416b;(function(_0x350841,_0x24763d){const _0x141000=a2_0x416b,_0x4e276a=_0x350841();while(!![]){try{const _0x2c7185=-parseInt(_0x141000(0x1cc))/0x1*(-parseInt(_0x141000(0x1d0))/0x2)+parseInt(_0x141000(0x1c8))/0x3*(parseInt(_0x141000(0x1c1))/0x4)+-parseInt(_0x141000(0x1da))/0x5*(-parseInt(_0x141000(0x1c4))/0x6)+-parseInt(_0x141000(0x1c7))/0x7*(-parseInt(_0x141000(0x1c3))/0x8)+parseInt(_0x141000(0x1ca))/0x9*(-parseInt(_0x141000(0x1d1))/0xa)+parseInt(_0x141000(0x1ce))/0xb+parseInt(_0x141000(0x1be))/0xc*(-parseInt(_0x141000(0x1d2))/0xd);if(_0x2c7185===_0x24763d)break;else _0x4e276a['push'](_0x4e276a['shift']());}catch(_0xff0870){_0x4e276a['push'](_0x4e276a['shift']());}}}(a2_0x2310,0xe496e));const a2_0x49f23a=(function(){let _0x1f78fb=!![];return function(_0x1ae592,_0x2933f5){const _0x390604=_0x1f78fb?function(){if(_0x2933f5){const _0x472726=_0x2933f5['apply'](_0x1ae592,arguments);return _0x2933f5=null,_0x472726;}}:function(){};return _0x1f78fb=![],_0x390604;};}()),a2_0x54b304=a2_0x49f23a(this,function(){const _0x2bd6cf=a2_0x416b;return a2_0x54b304[_0x2bd6cf(0x1d8)]()['search'](_0x2bd6cf(0x1d7))['toString']()[_0x2bd6cf(0x1d6)](a2_0x54b304)[_0x2bd6cf(0x1cf)](_0x2bd6cf(0x1d7));});a2_0x54b304();function a2_0x2310(){const _0x2e6dc9=['MD5','apply','336neUPtf','REQUEST_OBJ_CTX_KEY','app','196TyvJZV','getApplicationContext','16fdZaDv','2420052bcaTVo','use','stringify','1201753jagGCl','64734kgZODd','get','36HIeTyf','crypto-js','2909uwglIY','__esModule','10024289wLoAvj','search','634bMkPOt','3739360fPVIXq','559663gtrzpu','value','set','parse','constructor','(((.+)+)+)+$','toString','Method::Decorator','5tdWsPY'];a2_0x2310=function(){return _0x2e6dc9;};return a2_0x2310();}'use strict';Object['defineProperty'](exports,a2_0x10b485(0x1cd),{'value':!![]}),exports['Cache']=Cache;const crypto_js_1=require(a2_0x10b485(0x1cb)),CacheService_1=require('../service/CacheService'),core_1=require('@midwayjs/core');function json_encode(_0x44ae3d){const _0x157efe=a2_0x10b485;try{return JSON[_0x157efe(0x1c6)](_0x44ae3d);}catch(_0x496fbd){return undefined;}}function a2_0x416b(_0x42f300,_0x55255b){const _0x301945=a2_0x2310();return a2_0x416b=function(_0x54b304,_0x49f23a){_0x54b304=_0x54b304-0x1bc;let _0x231038=_0x301945[_0x54b304];return _0x231038;},a2_0x416b(_0x42f300,_0x55255b);}function Cache(_0x5372f1,_0x3c8826){return(_0x5bc51f,_0x4b3070,_0x22428a)=>{const _0x54e904=a2_0x416b,_0x3f9e02=_0x22428a[_0x54e904(0x1d3)];return _0x22428a['value']=async function(..._0x19e4c0){const _0x1723de=_0x54e904;_0x5372f1=(_0x5372f1?''+_0x5372f1:''+(_0x4b3070||''))+'.'+(0x0,crypto_js_1[_0x1723de(0x1bc)])(json_encode(_0x19e4c0))[_0x1723de(0x1d8)]();let _0x2598da=await this[core_1[_0x1723de(0x1bf)]][_0x1723de(0x1c0)][_0x1723de(0x1c2)]()['getAsync'](CacheService_1['CacheService']),_0x27cc53=await _0x2598da['use'](_0x1723de(0x1d9))[_0x1723de(0x1c9)](_0x5372f1);if(_0x27cc53)return JSON[_0x1723de(0x1d5)](_0x27cc53);else _0x27cc53=await _0x3f9e02[_0x1723de(0x1bd)](this,[..._0x19e4c0]),await _0x2598da[_0x1723de(0x1c5)](_0x1723de(0x1d9))[_0x1723de(0x1d4)](_0x5372f1,JSON[_0x1723de(0x1c6)](_0x27cc53),_0x3c8826);return _0x27cc53;},_0x22428a;};}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a3_0x2157c9=a3_0x52fb;(function(_0x4abc56,_0x9e9aa3){var _0x4833ed=a3_0x52fb,_0xc94128=_0x4abc56();while(!![]){try{var _0x4e3f19=-parseInt(_0x4833ed(0x1ae))/0x1+parseInt(_0x4833ed(0x1b9))/0x2*(parseInt(_0x4833ed(0x1bc))/0x3)+parseInt(_0x4833ed(0x1b8))/0x4+-parseInt(_0x4833ed(0x1b3))/0x5*(parseInt(_0x4833ed(0x1ab))/0x6)+parseInt(_0x4833ed(0x1b1))/0x7*(parseInt(_0x4833ed(0x1af))/0x8)+parseInt(_0x4833ed(0x1bd))/0x9+parseInt(_0x4833ed(0x1b5))/0xa*(parseInt(_0x4833ed(0x1ad))/0xb);if(_0x4e3f19===_0x9e9aa3)break;else _0xc94128['push'](_0xc94128['shift']());}catch(_0x2d1d92){_0xc94128['push'](_0xc94128['shift']());}}}(a3_0x1552,0xd5ac9));var a3_0x1a3b38=(function(){var _0x561cb0=!![];return function(_0x26cb44,_0x3eb2d3){var _0x306bfd=_0x561cb0?function(){if(_0x3eb2d3){var _0x3684af=_0x3eb2d3['apply'](_0x26cb44,arguments);return _0x3eb2d3=null,_0x3684af;}}:function(){};return _0x561cb0=![],_0x306bfd;};}()),a3_0x95c624=a3_0x1a3b38(this,function(){var _0x251979=a3_0x52fb;return a3_0x95c624[_0x251979(0x1bb)]()[_0x251979(0x1aa)](_0x251979(0x1b6))['toString']()[_0x251979(0x1a9)](a3_0x95c624)[_0x251979(0x1aa)](_0x251979(0x1b6));});function a3_0x1552(){var _0x2b1b76=['223546ktgCqz','./service/CacheService','toString','3Ogytaf','13175721cNlqkG','Configuration','defineProperty','CustomConfiguration','constructor','search','24LgVsXn','./configuration','177298JPExyL','1138154BZqstJ','1624EZihJZ','CacheService','11417RRGdhH','./decorator/Cache','1889150PgObdO','__esModule','610wKfvqJ','(((.+)+)+)+$','Cache','2538600AXGTII'];a3_0x1552=function(){return _0x2b1b76;};return a3_0x1552();}a3_0x95c624();'use strict';Object[a3_0x2157c9(0x1bf)](exports,a3_0x2157c9(0x1b4),{'value':!![]}),exports[a3_0x2157c9(0x1b0)]=exports[a3_0x2157c9(0x1b7)]=exports[a3_0x2157c9(0x1be)]=void 0x0;var configuration_1=require(a3_0x2157c9(0x1ac));Object[a3_0x2157c9(0x1bf)](exports,a3_0x2157c9(0x1be),{'enumerable':!![],'get':function(){var _0x11f55a=a3_0x2157c9;return configuration_1[_0x11f55a(0x1c0)];}});var Cache_1=require(a3_0x2157c9(0x1b2));Object[a3_0x2157c9(0x1bf)](exports,a3_0x2157c9(0x1b7),{'enumerable':!![],'get':function(){var _0x35b712=a3_0x2157c9;return Cache_1[_0x35b712(0x1b7)];}});function a3_0x52fb(_0x5c5208,_0x36da6f){var _0x4ed78f=a3_0x1552();return a3_0x52fb=function(_0x95c624,_0x1a3b38){_0x95c624=_0x95c624-0x1a9;var _0x1552d4=_0x4ed78f[_0x95c624];return _0x1552d4;},a3_0x52fb(_0x5c5208,_0x36da6f);}var CacheService_1=require(a3_0x2157c9(0x1ba));Object['defineProperty'](exports,'CacheService',{'enumerable':!![],'get':function(){var _0x64123c=a3_0x2157c9;return CacheService_1[_0x64123c(0x1b0)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x45f1ef=a4_0x4b1e;(function(_0x43b72b,_0x3b7c85){var _0x977116=a4_0x4b1e,_0xc75e62=_0x43b72b();while(!![]){try{var _0x535736=-parseInt(_0x977116(0x81))/0x1*(-parseInt(_0x977116(0x97))/0x2)+-parseInt(_0x977116(0x8e))/0x3+parseInt(_0x977116(0x9c))/0x4*(parseInt(_0x977116(0x84))/0x5)+parseInt(_0x977116(0xa6))/0x6*(parseInt(_0x977116(0x7c))/0x7)+parseInt(_0x977116(0x7b))/0x8*(parseInt(_0x977116(0xad))/0x9)+parseInt(_0x977116(0xb2))/0xa*(parseInt(_0x977116(0xac))/0xb)+-parseInt(_0x977116(0x86))/0xc*(parseInt(_0x977116(0x91))/0xd);if(_0x535736===_0x3b7c85)break;else _0xc75e62['push'](_0xc75e62['shift']());}catch(_0x23b349){_0xc75e62['push'](_0xc75e62['shift']());}}}(a4_0x5f31,0xa4157));function a4_0x4b1e(_0x3a2c66,_0x35d11a){var _0x2be49b=a4_0x5f31();return a4_0x4b1e=function(_0x280358,_0x7164ab){_0x280358=_0x280358-0x7b;var _0x5f31bb=_0x2be49b[_0x280358];return _0x5f31bb;},a4_0x4b1e(_0x3a2c66,_0x35d11a);}var a4_0x7164ab=(function(){var _0x4f6a1d=!![];return function(_0x3b5bd3,_0xe5f1bd){var _0x7ce839=_0x4f6a1d?function(){var _0x70882=a4_0x4b1e;if(_0xe5f1bd){var _0x1a04dc=_0xe5f1bd[_0x70882(0x7f)](_0x3b5bd3,arguments);return _0xe5f1bd=null,_0x1a04dc;}}:function(){};return _0x4f6a1d=![],_0x7ce839;};}()),a4_0x280358=a4_0x7164ab(this,function(){var _0x443c5b=a4_0x4b1e;return a4_0x280358['toString']()[_0x443c5b(0x94)](_0x443c5b(0x87))['toString']()[_0x443c5b(0x85)](a4_0x280358)[_0x443c5b(0x94)](_0x443c5b(0x87));});a4_0x280358();'use strict';function a4_0x5f31(){var _0x323539=['name','design:type','caching','json_encode','CacheService','reset','metadata','259128PWlmLP','7htIYem','shift','Singleton','apply','options','335sCIlgx','set','Cache','21990Huenmp','constructor','60BibJMG','(((.+)+)+)+$','map','store','has','push','@midwayjs/core','config','2325390QHuEOY','json_decode','redis','7590869EfscQZ','filter','__esModule','search','object','hset','4754BcWyQE','get','stores','del','hdel','636fFIXWv','stringify','clients','decorate','Provide','prefix','cache','__metadata','catch','defineProperty','6346566cqZmpD','hget','getOwnPropertyDescriptor','ScopeEnum','function','length','7123534abqDmx','144zFGRXo','list','file','default','parse','20KZnnEX','Config','undefined','getClient','rpush'];a4_0x5f31=function(){return _0x323539;};return a4_0x5f31();}var __decorate=this&&this['__decorate']||function(_0x4379e4,_0x19cd84,_0x303bde,_0xd53a8e){var _0xc534d6=a4_0x4b1e,_0x1c9c0d=arguments[_0xc534d6(0xab)],_0x4bc675=_0x1c9c0d<0x3?_0x19cd84:_0xd53a8e===null?_0xd53a8e=Object[_0xc534d6(0xa8)](_0x19cd84,_0x303bde):_0xd53a8e,_0x1b12d3;if(typeof Reflect===_0xc534d6(0x95)&&typeof Reflect[_0xc534d6(0x9f)]===_0xc534d6(0xaa))_0x4bc675=Reflect[_0xc534d6(0x9f)](_0x4379e4,_0x19cd84,_0x303bde,_0xd53a8e);else{for(var _0x11da7e=_0x4379e4[_0xc534d6(0xab)]-0x1;_0x11da7e>=0x0;_0x11da7e--)if(_0x1b12d3=_0x4379e4[_0x11da7e])_0x4bc675=(_0x1c9c0d<0x3?_0x1b12d3(_0x4bc675):_0x1c9c0d>0x3?_0x1b12d3(_0x19cd84,_0x303bde,_0x4bc675):_0x1b12d3(_0x19cd84,_0x303bde))||_0x4bc675;}return _0x1c9c0d>0x3&&_0x4bc675&&Object['defineProperty'](_0x19cd84,_0x303bde,_0x4bc675),_0x4bc675;},__metadata=this&&this[a4_0x45f1ef(0xa3)]||function(_0x37fa14,_0x56b75a){var _0x3ef446=a4_0x45f1ef;if(typeof Reflect==='object'&&typeof Reflect[_0x3ef446(0xbd)]===_0x3ef446(0xaa))return Reflect[_0x3ef446(0xbd)](_0x37fa14,_0x56b75a);};Object[a4_0x45f1ef(0xa5)](exports,a4_0x45f1ef(0x93),{'value':!![]}),exports[a4_0x45f1ef(0x83)]=exports[a4_0x45f1ef(0xbb)]=void 0x0,exports[a4_0x45f1ef(0xba)]=json_encode,exports[a4_0x45f1ef(0x8f)]=json_decode;const cacheManager=require('cache-manager'),core_1=require(a4_0x45f1ef(0x8c));let CacheService=class CacheService{constructor(){var _0x1edd0b=a4_0x45f1ef;this[_0x1edd0b(0xa2)]=undefined,this[_0x1edd0b(0x9e)]=new Map();}['use'](_0x40f450){var _0x59f3df=a4_0x45f1ef,_0x3874e5,_0x3754d6;if(!this[_0x59f3df(0xa2)]){const _0x1c71b5=((_0x3874e5=this[_0x59f3df(0x8d)][_0x59f3df(0x99)])===null||_0x3874e5===void 0x0?void 0x0:_0x3874e5[(_0x3754d6=this['config'])===null||_0x3754d6===void 0x0?void 0x0:_0x3754d6[_0x59f3df(0xb0)]])||this[_0x59f3df(0x8d)][_0x59f3df(0x99)][_0x59f3df(0xaf)];this[_0x59f3df(0xa2)]=cacheManager[_0x59f3df(0xb9)]({..._0x1c71b5[_0x59f3df(0x80)],'store':_0x1c71b5['store']});}return!this['clients'][_0x59f3df(0x8a)](_0x40f450)&&this[_0x59f3df(0x9e)][_0x59f3df(0x82)](_0x40f450,new Cache(_0x40f450,this[_0x59f3df(0xa2)])),this[_0x59f3df(0x9e)]['get'](_0x40f450);}async[a4_0x45f1ef(0xbc)](){var _0x373149=a4_0x45f1ef;return await this[_0x373149(0xa2)][_0x373149(0xbc)]();}};exports['CacheService']=CacheService,__decorate([(0x0,core_1[a4_0x45f1ef(0xb3)])(a4_0x45f1ef(0xa2)),__metadata(a4_0x45f1ef(0xb8),Object)],CacheService['prototype'],a4_0x45f1ef(0x8d),void 0x0),exports[a4_0x45f1ef(0xbb)]=CacheService=__decorate([(0x0,core_1[a4_0x45f1ef(0xa0)])(),(0x0,core_1['Scope'])(core_1[a4_0x45f1ef(0xa9)][a4_0x45f1ef(0x7e)])],CacheService);class Cache{constructor(_0x714a6b,_0x2a7989){var _0x4dbb5d=a4_0x45f1ef;this[_0x4dbb5d(0xa2)]=_0x2a7989,this[_0x4dbb5d(0xa1)]=_0x714a6b;}async[a4_0x45f1ef(0x9a)](_0x4bbeac){var _0xd6423f=a4_0x45f1ef;return await this[_0xd6423f(0xa2)][_0xd6423f(0x9a)](this[_0xd6423f(0xa1)]+':'+_0x4bbeac);}async[a4_0x45f1ef(0x82)](_0x5e0d84,_0x506a94,_0x285cc8){var _0x266890=a4_0x45f1ef,_0x25078d,_0xc1d26e;return((_0xc1d26e=(_0x25078d=this[_0x266890(0xa2)])===null||_0x25078d===void 0x0?void 0x0:_0x25078d[_0x266890(0x89)])===null||_0xc1d26e===void 0x0?void 0x0:_0xc1d26e[_0x266890(0xb7)])==_0x266890(0x90)?await this['cache'][_0x266890(0x82)](this[_0x266890(0xa1)]+':'+_0x5e0d84,_0x506a94,{'ttl':_0x285cc8}):await this[_0x266890(0xa2)]['set'](this[_0x266890(0xa1)]+':'+_0x5e0d84,_0x506a94,{'ttl':_0x285cc8});}async['get'](_0x3b2f26,_0x43e4e8,_0xfe8bf0){return new Promise((_0x10909b,_0x1e77fc)=>{var _0x14f3e6=a4_0x4b1e;this[_0x14f3e6(0xa2)][_0x14f3e6(0x98)](this['prefix']+':'+_0x3b2f26,async(_0x4c8f4a,_0xd523ad)=>{var _0x8c3387=_0x14f3e6;_0x4c8f4a?_0x1e77fc(_0x4c8f4a):((_0xd523ad===undefined||_0xd523ad===null)&&(typeof _0x43e4e8==_0x8c3387(0xaa)?(_0xd523ad=await _0x43e4e8()[_0x8c3387(0xa4)](_0x1fac7a=>_0x1e77fc(_0x1fac7a)),typeof _0xd523ad!=_0x8c3387(0xb4)&&await this[_0x8c3387(0x82)](_0x3b2f26,_0xd523ad,_0xfe8bf0)):_0xd523ad=_0x43e4e8),_0x10909b(_0xd523ad));});});}async[a4_0x45f1ef(0x9b)](_0x3bcd3e,_0x302414){var _0x2c321a=a4_0x45f1ef;return await this[_0x2c321a(0x9a)](_0x3bcd3e+'#'+_0x302414);}async[a4_0x45f1ef(0x96)](_0x3c75a5,_0x123189,_0x9ae7c1,_0x2cc08a){return await this['set'](_0x3c75a5+'#'+_0x123189,_0x9ae7c1,_0x2cc08a);}async[a4_0x45f1ef(0xa7)](_0x164a0a,_0xe548a0,_0x49b1c3,_0x2960bf){var _0x2a7131=a4_0x45f1ef;return await this[_0x2a7131(0x98)](_0x164a0a+'#'+_0xe548a0,_0x49b1c3,_0x2960bf);}[a4_0x45f1ef(0xae)](_0xaa33eb){const _0x93edac={'all':async()=>{var _0x401817=a4_0x4b1e,_0x8298b4,_0x280045,_0x4d659c,_0x7a5909,_0x5a0099;return((_0x280045=(_0x8298b4=this['cache'])===null||_0x8298b4===void 0x0?void 0x0:_0x8298b4[_0x401817(0x89)])===null||_0x280045===void 0x0?void 0x0:_0x280045[_0x401817(0xb7)])=='redis'?(await((_0x5a0099=(_0x7a5909=(_0x4d659c=this===null||this===void 0x0?void 0x0:this[_0x401817(0xa2)])===null||_0x4d659c===void 0x0?void 0x0:_0x4d659c[_0x401817(0x89)])===null||_0x7a5909===void 0x0?void 0x0:_0x7a5909[_0x401817(0xb5)]())===null||_0x5a0099===void 0x0?void 0x0:_0x5a0099['lrange'](this[_0x401817(0xa1)]+':'+_0xaa33eb,0x0,-0x1))||[])[_0x401817(0x88)](_0x1ceea9=>json_decode(_0x1ceea9)):await this['get'](_0xaa33eb,[]);},'pop':async()=>{var _0x482d02=a4_0x4b1e,_0x4b69df,_0x5f13fc,_0x5d5e2f,_0x2c5f7b,_0x10d92c;if(((_0x5f13fc=(_0x4b69df=this[_0x482d02(0xa2)])===null||_0x4b69df===void 0x0?void 0x0:_0x4b69df[_0x482d02(0x89)])===null||_0x5f13fc===void 0x0?void 0x0:_0x5f13fc[_0x482d02(0xb7)])=='redis')return json_decode(await((_0x10d92c=(_0x2c5f7b=(_0x5d5e2f=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x5d5e2f===void 0x0?void 0x0:_0x5d5e2f[_0x482d02(0x89)])===null||_0x2c5f7b===void 0x0?void 0x0:_0x2c5f7b[_0x482d02(0xb5)]())===null||_0x10d92c===void 0x0?void 0x0:_0x10d92c['lpop'](this[_0x482d02(0xa1)]+':'+_0xaa33eb)));else{let _0x41f032=await this[_0x482d02(0x98)](_0xaa33eb,[]),_0x9d506=_0x41f032[_0x482d02(0x7d)]();return await this[_0x482d02(0x82)](_0xaa33eb,_0x41f032),_0x9d506;}},'push':async(..._0x4ee291)=>{var _0x3a5900=a4_0x4b1e,_0x60a3a1,_0x4a2fc2,_0x38f624,_0x15c480,_0x17acf3;const _0x946b10=_0x4ee291[_0x3a5900(0x92)](_0x236973=>_0x236973!==undefined&&_0x236973!==null);if(((_0x4a2fc2=(_0x60a3a1=this[_0x3a5900(0xa2)])===null||_0x60a3a1===void 0x0?void 0x0:_0x60a3a1[_0x3a5900(0x89)])===null||_0x4a2fc2===void 0x0?void 0x0:_0x4a2fc2[_0x3a5900(0xb7)])=='redis')return await((_0x17acf3=(_0x15c480=(_0x38f624=this===null||this===void 0x0?void 0x0:this[_0x3a5900(0xa2)])===null||_0x38f624===void 0x0?void 0x0:_0x38f624['store'])===null||_0x15c480===void 0x0?void 0x0:_0x15c480[_0x3a5900(0xb5)]())===null||_0x17acf3===void 0x0?void 0x0:_0x17acf3[_0x3a5900(0xb6)](this[_0x3a5900(0xa1)]+':'+_0xaa33eb,..._0x946b10[_0x3a5900(0x88)](_0x1ca4fa=>json_encode(_0x1ca4fa)))),_0x946b10;else{let _0x38db70=await this['get'](_0xaa33eb,[]);return _0x38db70[_0x3a5900(0x8b)](..._0x946b10),await this[_0x3a5900(0x82)](_0xaa33eb,_0x38db70),_0x38db70;}}};return _0x93edac;}}exports[a4_0x45f1ef(0x83)]=Cache;function json_encode(_0x4731f4){var _0x34708c=a4_0x45f1ef;try{return JSON[_0x34708c(0x9d)](_0x4731f4);}catch(_0x32f888){return undefined;}}function json_decode(_0x51f782){var _0x38f774=a4_0x45f1ef;try{return JSON[_0x38f774(0xb1)](_0x51f782);}catch(_0x5d1345){return undefined;}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.8",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"javascript-obfuscator": "^4.0.2",
|
|
25
25
|
"typescript": "^5.5.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "de3191dd5e413a4a7bb9d199c0bf0d99f997c6f2"
|
|
28
28
|
}
|