From 5e3de90c7d948bb82e4651e9d5b73a63472fa9e9 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Feb 10 2017 10:27:24 +0000 Subject: Make CachedFunction.should_invalidate() abstract --- diff --git a/hubs/widgets/caching.py b/hubs/widgets/caching.py index 9067410..990dce6 100644 --- a/hubs/widgets/caching.py +++ b/hubs/widgets/caching.py @@ -88,7 +88,8 @@ class CachedFunction(object): def should_invalidate(self, message): """ Tell the cache invalidator if the received message should invalidate - this function's cache. + this function's cache. This function must be implemented by + subclasses. Args: message (dict): The recieved bus message. @@ -96,7 +97,7 @@ class CachedFunction(object): Returns: bool: If ``True``, the cache will be rebuilt. """ - return True + raise NotImplementedError def is_cached(self): """