79363065

Date: 2025-01-16 21:12:29
Score: 3.5
Natty:
Report link

I think I have a valid use case that is related to the original question.

Some Python caching libraries let you specify caching policy using a decorator, e.g.:

@cache(ttl=100)
def retrieve_data():

If I want to include that code in a package and I want the package users to be able to set the cache TTL value that is appropriate to their end applications, is that possible without sacrificing the simplicity of decorator syntax?

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Elk