Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
@@ -79,7 +79,9 @@ public class FederationCaffeineCache extends FederationCache {
@Override
public void clearCache() {
- this.cache.cleanUp();
+ if (this.cache != null) {
+ this.cache.cleanUp();
+ }
this.cache = null;
}
@@ -76,7 +76,9 @@ public class FederationGuavaCache extends FederationCache {
- cache.invalidateAll();
+ cache.invalidateAll();
cache = null;
@@ -91,7 +91,9 @@ public class FederationJCache extends FederationCache {
- this.cache.clear();
+ this.cache.clear();