11809: Prune collection cache asynchronously.
authorTom Clegg <tom@curoverse.com>
Wed, 7 Jun 2017 14:27:59 +0000 (10:27 -0400)
committerTom Clegg <tom@curoverse.com>
Wed, 7 Jun 2017 14:27:59 +0000 (10:27 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curoverse.com>

services/keep-web/cache.go

index b9e3e3e01fab46e1739e6d1efb4698f346807d3e..79701658b4579aba9c67f51d1d443e9289ebc3c7 100644 (file)
@@ -176,7 +176,7 @@ func (c *cache) Get(arv *arvadosclient.ArvadosClient, targetID string, forceRelo
                collection: collection,
        })
        if int64(len(collection["manifest_text"].(string))) > c.MaxCollectionBytes/int64(c.MaxCollectionEntries) {
-               c.pruneCollections()
+               go c.pruneCollections()
        }
        return collection, nil
 }