Closed sashokbg closed 11 months ago
Hi @sashokbg
Yes, that's possible and there are many options, including creating a CacheCleaningMiddleware
, or AbstractCashCleaningCommand
. Same works for notifications. 💡
Hello @sizovs I looked again at the examples in the doc and I managed to do it properly. Basically we need to call "next.invoke()" and the put the "after" logic before returning.
@Override
public <R, C extends Command<R>> R invoke(C command, Next<R> next) {
R invoke = next.invoke();
managerInitService.initPermissions();
return invoke;
}
Hello, I am trying to run something after a command has executed to refresh some caches and things like that. Is it possible to do this with a middleware or a notification handler ?