Hello I have function which can return results or timeout, simplified example is below:
@cache()
def longjob(args):
try:
data = getdata(args)
return data
except timeout:
return 'data not available try again later'
When function cannot return data there is no reason to cache result. Is there any way to remove single entry from cache? I am aware of clear_cache() but this remove all cached values.
Hello I have function which can return results or timeout, simplified example is below:
When function cannot return data there is no reason to cache result. Is there any way to remove single entry from cache? I am aware of clear_cache() but this remove all cached values.