[caching] first things first

This commit is contained in:
Max Zwiessele 2014-05-21 16:40:57 +01:00
parent 24a34aee95
commit 6b2681d849

View file

@ -107,8 +107,8 @@ class Cacher(object):
# 2: if anything is not cachable, we will just return the operation, without caching # 2: if anything is not cachable, we will just return the operation, without caching
if reduce(lambda a, b: a or (not (isinstance(b, Observable) or b is None)), inputs, False): if reduce(lambda a, b: a or (not (isinstance(b, Observable) or b is None)), inputs, False):
self.logger.info("some inputs are not observable: returning without caching") self.logger.info("some inputs are not observable: returning without caching")
self.logger.info(str(map(lambda x: isinstance(x, Observable) or x is None, inputs))) self.logger.debug(str(map(lambda x: isinstance(x, Observable) or x is None, inputs)))
self.logger.info(str(map(repr, inputs))) self.logger.debug(str(map(repr, inputs)))
return self.operation(*args, **kw) return self.operation(*args, **kw)
# 3&4: check whether this cache_id has been cached, then has it changed? # 3&4: check whether this cache_id has been cached, then has it changed?
try: try: