version 2.13.1

This commit is contained in:
mdipierro
2015-12-17 21:19:08 -06:00
parent 1636528a0f
commit 22c89d8dcc
13 changed files with 98 additions and 88 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ def remove_oldest_entries(storage, percentage=90):
# compute current memory usage (%)
old_mem = psutil.virtual_memory().percent
# if we have data in storage and utilization exceeds 90%
while storage and old_mem > percentage:
while storage and old_mem > percentage:
# removed oldest entry
storage.popitem(last=False)
# garbage collect
@@ -378,7 +378,7 @@ class CacheOnDisk(CacheAbstract):
def safe_apply(self, key, function, default_value=None):
"""
"""
Safely apply a function to the value of a key in storage and set
the return value of the function to it.