Make mine module event-based

Closes #16864
Merge branch 'issue_16864' of https://github.com/cachedout/salt into cachedout-issue_16864
fix lint
Merge pull request #18235 from thatch45/cachedout-issue_16864

Merge #18057