code: private void refreshTaskDefs() {
          try {
              withTransaction(tx -> {
                  Map<String, TaskDef> map = new HashMap<>();
                  findAllTaskDefs(tx).forEach(taskDef -> map.put(taskDef.getName(), taskDef));
  
                  synchronized (taskDefCache) {
                      taskDefCache.clear();
                      taskDefCache.putAll(map);
                  }
  
                  if (logger.isTraceEnabled()) {
                      logger.trace("Refreshed {} TaskDefs", taskDefCache.size());
                  }
              });
          } catch (Exception e){
              Monitors.error(className, "refreshTaskDefs");
              logger.error("refresh TaskDefs failed ", e);
          }
      }
docs: Query persistence for all defined {@link TaskDef} data, and cache it in {@link #taskDefCache}.