moleculer icon indicating copy to clipboard operation
moleculer copied to clipboard

allow action.cache.keys function access ctx

Open 0x0a0d opened this issue 4 years ago • 1 comments

It's easy to allow action's keygen function access ctx, just need to add ctx as 6th param at https://github.com/0x0a0d/moleculer/blob/master/src/cachers/base.js#L351

In my case, I need to access ctx.caller How do you think?

0x0a0d avatar Oct 28 '21 05:10 0x0a0d

OK. In the next major release, we should refactor it and pass only ctx, and opts only instead of many parameters.

icebob avatar Nov 01 '21 10:11 icebob