def get_mytimestamp(cache):
return cache.get("time", datetime.now())
# Bind the 'time' key in the cache to mytimestamp
bound_mytimestamp = pn.bind(get_mytimestamp, pn.state.cache)
Maybe pn.state.param.cache
? Not sure if it’ll work.