Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is that possible to delete_memoized according to part of parameters? #165

Open
flniu opened this issue Feb 24, 2017 · 0 comments
Open

Is that possible to delete_memoized according to part of parameters? #165

flniu opened this issue Feb 24, 2017 · 0 comments

Comments

@flniu
Copy link

flniu commented Feb 24, 2017

Example:

@cache.memoize()
def param_func(a, b):
    return a+b+random.randrange(1, 50)

For the function above:

  • cache.delete_memoized('random_func') will delete all caches of this function;
  • cache.delete_memoized('param_func', 1, 2) will delete the cache with parameters a=1 and b=2;
  • Is that possible to delete the caches with parameters a=1 for all b values, something like cache.delete_memoized('param_func', 1)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant