String dumpCacheToDisk(String path, MemoryCache cache) {
        if (path == null || path.isEmpty()) {
            path = DEFAULT_DUMP_DIR;
            log.log(Level.INFO, "dumpCache. No path or empty path. Using '" + path + "'");
        }
        if (path.endsWith("/")) {
            path = path.substring(0, path.length() - 1);
        }

        File dir = new File(path);
        if ( ! dir.exists()) {
            log.log(Level.INFO, dir.getAbsolutePath() + " does not exist, creating it");
            try {
                Files.createDirectory(dir.toPath());
            } catch (IOException e) {
                return "Failed creating '" + dir.getAbsolutePath() + "', " + e.getClass().getSimpleName();
            }
        }

        if ( ! dir.isDirectory()) {
            return "Not a directory: '" + dir.getAbsolutePath() + "'";
        }
        if ( ! dir.canWrite()) {
            return "Not able to write to '" + dir.getAbsolutePath() + "'";
        }

        log.log(Level.INFO, "Dumping cache to '" + dir.getAbsolutePath() + "'");
        for (RawConfig config : cache.values()) {
            writeConfigToFile(config, path);
        }
        return "success";
    }
Put in cache, except when config has an error

@param config config to update in cache
config-proxy/src/main/java/com/yahoo/vespa/config/proxy/MemoryCache.java