diff --git a/Changes b/Changes
index c7f6c8e..d7a8a06 100644
--- a/Changes
+++ b/Changes
@@ -1,7 +1,8 @@
-0.58 2018-07-25
+0.58.0 2018-07-26
         - Implemented referencing cached collection (margaretha)
         - Implemented deserialization of collection with array values and cache option (margaretha)
         - Implemented caching collection (margaretha)
+        - Implemented KrillCollection cache clearing (margaretha)
 
 0.57 2018-04-05
         - [feature] Support text queries in metadata
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 8aa57c8..dfcea3a 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -73,7 +73,6 @@
 import de.ids_mannheim.korap.response.Text;
 import de.ids_mannheim.korap.util.KrillProperties;
 import de.ids_mannheim.korap.util.QueryException;
-import net.sf.ehcache.CacheManager;
 
 /**
  * <p>KrillIndex implements a simple API for searching in and writing
@@ -373,6 +372,7 @@
         this.writer().commit();
         commitCounter = 0;
         this.closeReader();
+        KrillCollection.cache.removeAll();
     };
 
 
@@ -423,8 +423,6 @@
         catch (IOException e) {
             log.error("Unable to add document");
         };
-
-        CacheManager.getInstance().clearAll();
         return doc;
     };
 
@@ -454,8 +452,6 @@
         catch (IOException e) {
             log.error("Unable to delete documents");
         };
-
-        CacheManager.getInstance().clearAll();
         return false;
     };
 
@@ -504,7 +500,6 @@
             fd.setUID(uid);
             fd = this.addDoc(fd);
         };
-        CacheManager.getInstance().clearAll();
         return fd;
     };
 
@@ -561,7 +556,6 @@
             return this.addDoc(fd);
         };
         
-        CacheManager.getInstance().clearAll();
         return fd;
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestVCCaching.java b/src/test/java/de/ids_mannheim/korap/collection/TestVCCaching.java
index 108c1e2..745a606 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestVCCaching.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestVCCaching.java
@@ -1,8 +1,8 @@
 package de.ids_mannheim.korap.collection;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -15,7 +15,7 @@
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillIndex;
-import net.sf.ehcache.CacheManager;
+import de.ids_mannheim.korap.index.FieldDocument;
 import net.sf.ehcache.Element;
 
 public class TestVCCaching {
@@ -33,10 +33,17 @@
     }
 
     @Test
-    public void testCacheVC () throws IOException {
+    public void testCache () throws IOException {
+        testAddToCache();
+        testSearchCachedVC();
+        testClearCache();
+    }
+
+    private void testAddToCache () throws IOException {
         InputStream is = getClass().getClassLoader()
                 .getResourceAsStream("named-vc/named-vc-free.jsonld");
         String json = IOUtils.toString(is);
+        is.close();
 
         KrillCollection kc = new KrillCollection(json);
         kc.setIndex(index);
@@ -46,9 +53,6 @@
         CachedVCData cc = (CachedVCData) element.getObjectValue();
 
         assertTrue(cc.getDocIdMap().size() > 0);
-
-        testSearchCachedVC();
-        testClearCache();
     }
 
     private void testSearchCachedVC () throws IOException {
@@ -66,10 +70,35 @@
         assertNotNull(result);
         assertTrue(!result.isEmpty());
     }
+
+    private void testClearCache () {
+        KrillCollection.cache.removeAll();
+
+        Element element = KrillCollection.cache.get("cache-goe");
+        assertNull(element);
+    }
+
+    @Test
+    public void testAddDocToIndex () throws IOException {
+        testAddToCache();
+
+        FieldDocument fd = new FieldDocument();
+        fd.addTV("base", "x  y", "[(0-3)s:x]" + // 1
+                "[(3-4)s:y]" // 2
+        );
+        index.addDoc(fd);
+        index.commit();
+        
+        Element element = KrillCollection.cache.get("cache-goe");
+        assertNull(element);
+    }
     
-    public void testClearCache () {
-        CacheManager cacheManager = CacheManager.getInstance();
-        cacheManager.clearAll();
+    @Test
+    public void testDelDocFromIndex () throws IOException {
+        testAddToCache();
+
+        index.delDocs("textSigle", "GOE/AGF/00000");
+        index.commit();
         
         Element element = KrillCollection.cache.get("cache-goe");
         assertNull(element);
