thadeusb / flask-cache

Cache extension for Flask
http://packages.python.org/Flask-Cache/
Other
697 stars 185 forks source link

memoize can't deal the magic arguments #177

Closed ponytailer closed 6 years ago

ponytailer commented 6 years ago

memoize_make_cache_key can't deal the magic arguments.

@cache.memoize(timeout=3)
def test(**kw):
    return 1
dengshaochun commented 6 years ago

I had the same problem

dengshaochun commented 6 years ago

i modify part of the code, make memoize support function only with magic arguments.

180

ponytailer commented 6 years ago

If the same value has the different key in the kwargs, your code had the bug.

{‘m’:1}. And {‘n’:1}

dengshaochun commented 6 years ago

yeah, you are right,thank you, I've closed pull requests, and try to fix the problem.

ponytailer commented 6 years ago

yep, I created a PR for it. But the CI of this project has been down.

ponytailer commented 6 years ago

You can use the #185