@@ -259,15 +259,12 @@ def __init__(self, cache_dir, **options):
259259 raise ValueError ("Must have read/write access to {} for local file caching." .format (self .cache_dir ))
260260
261261 def cache_has (self , cache_key ):
262- print "file has" ,cache_key
263262 return os .path .exists (self .cache_path (cache_key ))
264263
265264 def cache_get (self , cache_key , ** options ):
266- print "file get" ,cache_key
267265 return self .load_local_resource_contents (self .cache_path (cache_key ),** options )
268266
269267 def cache_set (self , cache_key , value ):
270- print "file set" ,cache_key
271268 cache_path = self .cache_path (cache_key )
272269 bucket_dir = os .path .dirname (cache_path )
273270 if not os .path .exists (bucket_dir ):
@@ -287,22 +284,18 @@ def __init__(self, cache_max_size=0, **options):
287284 self .cache_max_size = cache_max_size
288285
289286 def cache_set (self , cache_key , value ):
290- print "dict set" ,cache_key
291287 if self .cache_max_size and len (self .cache_dict ) >= self .cache_max_size :
292288 oldest_cache_key = min (self .cache_used .items (), key = lambda e : e [1 ])[0 ]
293- print "dict del" , oldest_cache_key
294289 del self .cache_used [oldest_cache_key ]
295290 del self .cache_dict [oldest_cache_key ]
296291 self .cache_dict [cache_key ] = value
297292 self .cache_used [cache_key ] = time .time ()
298293
299294 def cache_get (self , cache_key ):
300- print "dict get" ,cache_key
301295 self .cache_used [cache_key ] = time .time ()
302296 return self .cache_dict [cache_key ]
303297
304298 def cache_has (self , cache_key ):
305- print "dict has" ,cache_key
306299 return cache_key in self .cache_dict
307300
308301class DoubleCachedSC2Factory (DictCachedSC2Factory , FileCachedSC2Factory ):
0 commit comments