It could be nice to be able to provide a function that returns the specific key to use much like etagger does:
def keyer(*args, **kwargs):
id_ = kwargs.get('id')
if id_ is not None:
return id_
else:
raise NotImplementedError()
@memo(keyer=keyer)
def render_blog_post(content, **kwargs):
# Some expensive process to render latex, Markdown, etc.
pass
# ...
render_blog_post(post.body, id=post.id)
It could be nice to be able to provide a function that returns the specific key to use much like
etaggerdoes: