mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
14.33.2018 6a1a04156c341f59e3f86462ae974eb3e3411784
borgbutler-core/src/main/java/de/micromata/borgbutler/cache/ButlerCache.java
@@ -41,7 +41,7 @@
    public RepoInfo getRepoInfo(String idOrName) {
        BorgRepoConfig repoConfig = ConfigurationHandler.getConfiguration().getRepoConfig(idOrName);
        RepoInfo repoInfo = repoInfoCacheAccess.get(repoConfig.getRepo());
        if (repoInfo == null) {
        if (repoInfo == null ||repoInfo.getRepository() == null) {
            repoInfo = BorgCommands.info(repoConfig);
            repoInfoCacheAccess.put(repoConfig.getRepo(), repoInfo);
        }
@@ -63,7 +63,16 @@
        return repositories;
    }
    public void clearAllCacheAccess(){
        log.info("Clearing repositories cache (with list of archives)...");
        this.repoListCacheAccess.clear();
        clearRepoInfoCacheAccess();
        log.info("Clearing cache with file lists of archives...");
        this.archiveFilelistCache.removeAllCacheFiles();
    }
    public void clearRepoInfoCacheAccess() {
        log.info("Clearing repositories info cache...");
        this.repoInfoCacheAccess.clear();
    }