happyly.caching.mixins.CacheByRequestIdMixin¶
-
class
happyly.caching.mixins.CacheByRequestIdMixin(cacher)¶ Bases:
objectMixin which adds caching functionality to Listener. Utilizes notions of listener’s topic and request id of message – otherwise will not work.
To be used via multiple inheritance. For example, given some component
SomeListeneryou can define its caching equivalent by definingSomeCachedListenerwhich inherits from bothSomeListenerandCacheByRequestIdMixin.on_deserialization_failed(message, error)on_published(original_message, …)on_received(message)