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

cache_multi_on_arguments broken by @classmethod #133

Closed
sqlalchemy-bot opened this issue Nov 15, 2018 · 4 comments
Closed

cache_multi_on_arguments broken by @classmethod #133

sqlalchemy-bot opened this issue Nov 15, 2018 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Krishna Vudata (kvudata)

Specifically this is when using the default function_multi_key_generator.
At this line in region.py in the cache_multi_on_arguments decorator we zip up the args together with the generated keys but the default function_multi_key_generator will drop the first arg and return n-1 when the first arg is cls.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

as far as I can recall, classmethods don't work at all, this is likely a dupe of #95. This is why function_multi_key_generator is pluggable. if we had more of a dedicated maintainer we could get someone to pick up on https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/14/fix-cache_multi_on_arguments-when-used-on/diff

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

Duplicate of #95.

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (zzzeek):

  • added labels: duplicate
  • changed status to closed

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

let's continue at #95. cc @jvanasco @morgan_fainberg

@sqlalchemy-bot sqlalchemy-bot added bug Something isn't working duplicate This issue or pull request already exists labels Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant