diff --git a/diskcache/core.py b/diskcache/core.py index 7a3d23b..cd75423 100644 --- a/diskcache/core.py +++ b/diskcache/core.py @@ -2364,6 +2364,10 @@ def __len__(self): """Count of items in cache including expired items.""" return self.reset('count') + def __bool__(self): + """Mark Cache objects as Truthy""" + return True + def __getstate__(self): return (self.directory, self.timeout, type(self.disk))