Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: client/cipd.py

Issue 2853413002: Add unit test to clean_caches() (Closed)
Patch Set: os.path.relpath Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/isolateserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cipd.py
diff --git a/client/cipd.py b/client/cipd.py
index 927ec594354790a93fbc22c418c1af17fda29daf..6fb16324368a20f75f121cf4ecdbe24c402ca925 100644
--- a/client/cipd.py
+++ b/client/cipd.py
@@ -409,7 +409,8 @@ def get_client(service_url, package_name, version, cache_dir, timeout=None):
version_cache = isolateserver.DiskCache(
unicode(os.path.join(cache_dir, 'versions')),
isolateserver.CachePolicies(0, 0, 300),
- hashlib.sha1)
+ hashlib.sha1,
+ trim=True)
with version_cache:
version_cache.cleanup()
# Convert |version| to a string that may be used as a filename in disk
@@ -431,7 +432,8 @@ def get_client(service_url, package_name, version, cache_dir, timeout=None):
instance_cache = isolateserver.DiskCache(
unicode(os.path.join(cache_dir, 'clients')),
isolateserver.CachePolicies(0, 0, 5),
- hashlib.sha1)
+ hashlib.sha1,
+ trim=True)
with instance_cache:
instance_cache.cleanup()
if instance_id not in instance_cache:
« no previous file with comments | « no previous file | client/isolateserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698