Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 718adae

Browse files
committed
evict descendants in cache after move, invalidate quota cache after folder creation
1 parent 0ab15e4 commit 718adae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/cryptomator/cloudaccess/MetadataCachingProviderDecorator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public CompletionStage<CloudPath> createFolder(CloudPath folder) {
118118
return delegate.createFolder(folder) //
119119
.whenComplete((metadata, exception) -> {
120120
itemMetadataCache.invalidate(folder);
121+
quotaCache.invalidateAll();
121122
});
122123
}
123124

@@ -146,8 +147,8 @@ public CompletionStage<Void> deleteFolder(CloudPath folder) {
146147
public CompletionStage<CloudPath> move(CloudPath source, CloudPath target, boolean replace) {
147148
return delegate.move(source, target, replace) //
148149
.whenComplete((path, exception) -> {
149-
itemMetadataCache.invalidate(source);
150-
itemMetadataCache.invalidate(target);
150+
evictIncludingDescendants(source);
151+
evictIncludingDescendants(target);
151152
quotaCache.invalidateAll();
152153
});
153154
}

0 commit comments

Comments
 (0)