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

...
Kai Reinhard
10.01.2018 5c6ef91b43f0b0cc225b1a5b8abdc08b670a9317
borgbutler-core/src/main/java/de/micromata/borgbutler/cache/AbstractCache.java
@@ -46,6 +46,20 @@
        state = STATE.DIRTY;
    }
    /**
     * Calls {@link #clear()} and removes the cache files. Therefore a new creation of this cache is forced.
     */
    public void clearAndReset() {
        synchronized (this) {
            if (cacheFile.exists()) {
                log.info("Clearing cache and deleting cache file (recreation is forced): " + cacheFile.getAbsolutePath());
                cacheFile.delete();
            }
            clear();
            state = STATE.SAVED;
        }
    }
    protected void setDirty() {
        state = STATE.DIRTY;
    }