public static CompletableFuture<Void> invalidateCachesAndPushUpdates(LuckPermsPlugin plugin) {
        plugin.getGroupManager().invalidateAllGroupCaches();
        plugin.getUserManager().invalidateAllUserCaches();

        Optional<InternalMessagingService> messagingService = plugin.getMessagingService();
        if (messagingService.isPresent() && plugin.getConfiguration().get(ConfigKeys.AUTO_PUSH_UPDATES)) {
            return messagingService.get().getUpdateBuffer().request();
        } else {
            return CompletableFuture.completedFuture(null);
        }
    }
Utility methods for saving users, groups and tracks.
common/src/main/java/me/lucko/luckperms/common/command/utils/StorageAssistant.java