1. dairiki
  2. dogpile.cache

Pull requests

#2 Declined
Repository
Branch
bug.cache-multi-on-method
Repository
Branch
master

Fix cache_multi_on_arguments (mostly) when used on a class method

Author
  1. dairiki
Reviewers
Description

This patch fixes the CacheRegion.cache_multi_on_arguments decorator so that it will (mostly) work on class methods.

Some of these fixes are rather ugly. They would probably be prettier if function_multi_key_generator were dumbed down so that it doesn't try to ignore the first argument when the wrapped function appears to be a method, since we now have to add a dummy self argument when we call it from set, invalidate, and get.

Refresh is still broken for class methods. It might be possible to fix it by making the function_multi_key_generator return a property, but I say it's not worth it.

  • Learn about pull requests

Comments (0)