class NotifierCacheManager {

    private final TemplateManager templateManager;

    private final NotifierManager notifierManager;

    public NotifierCacheManager(TemplateManager templateManager, NotifierManager notifierManager) {
        this.templateManager = templateManager;
        this.notifierManager = notifierManager;
    }

    @EventListener
    public void handleTemplateSave(EntitySavedEvent<NotifyTemplateEntity> event) {
        event.async(
            reloadTemplate(event.getEntity())
        );
    }

    @EventListener
    public void handleTemplateModify(EntityModifyEvent<NotifyTemplateEntity> event) {
        event.async(
            reloadTemplate(event.getBefore())
        );
    }

    @EventListener
    public void handleTemplateDelete(EntityDeletedEvent<NotifyTemplateEntity> event) {
        event.async(
            reloadTemplate(event.getEntity())
        );
    }
    @EventListener
    public void handleConfigSave(EntitySavedEvent<NotifyConfigEntity> event) {
        event.async(
            reloadConfig(event.getEntity())
        );
    }

    @EventListener
    public void handleConfigModify(EntityModifyEvent<NotifyConfigEntity> event) {
        event.async(
            reloadConfig(event.getBefore())
        );
    }

    @EventListener
    public void handleConfigDelete(EntityDeletedEvent<NotifyConfigEntity> event) {
        event.async(
            reloadConfig(event.getEntity())
        );
    }

    protected Mono<Void> reloadConfig(List<NotifyConfigEntity> entities) {<FILL_FUNCTION_BODY>}

    protected Mono<Void> reloadTemplate(List<NotifyTemplateEntity> entities) {
        return Flux.fromIterable(entities)
                   .map(NotifyTemplateEntity::getId)
                   .doOnNext(id -> log.info("clear template [{}] cache", id))
                   .flatMap(templateManager::reload)
                   .then();
    }

}

        return Flux.fromIterable(entities)
                   .map(NotifyConfigEntity::getId)
                   .doOnNext(id -> log.info("clear notifier config [{}] cache", id))
                   .flatMap(notifierManager::reload)
                   .then();
    
<no_super_class>