ModelCache.add_callback#

ModelCache.add_callback(name: str, callback)[source]#

Add a cache attribute and a callback function for updating the attribute.

Parameters
namestr

name of the cached function return value

callbackcallable

callback function for updating the cached attribute