- self.collections[pdh] = arvados.collection.CollectionReader(pdh, api_client=self.api_client,
- keep_client=self.keep_client)
- return self.collections[pdh]
+ cr = arvados.collection.CollectionReader(pdh, api_client=self.api_client,
+ keep_client=self.keep_client,
+ num_retries=self.num_retries)
+ sz = len(cr.manifest_text()) * 128
+ self.collections[pdh] = (cr, sz)
+ self.total += sz
+ self.cap_cache()
+ else:
+ cr, sz = self.collections[pdh]
+ # bump it to the back
+ del self.collections[pdh]
+ self.collections[pdh] = (cr, sz)
+ return cr