-
Notifications
You must be signed in to change notification settings - Fork 354
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
Make it possible to use single cache for different methods #83
Comments
Certainly possible! I'll run it past a couple other contributors and see what everyone thinks. Shouldn't be too much of a problem. Also, cachetools looks like a neat package, but I think the implementation will look a bit different (while having the same effect) :) |
@mahmoud, thank you for your answer! Personally I don't need this feature, but I think it would be nice to have: make usual functions (not bound methods) to follow same behaviour. |
Hey @grundic! I updated |
@mahmoud sorry for late reply, as I was on vacation. The change looks good for me, I've tested it with my code -- works good. Thank you very much! |
Would it be possible to implement cache separation of different methods with same signature for
cachedmethod
decorator? Here is small example with use ofboltons
andcachetools
:Here is output:
As you can see, third print gives us 4, though I expect to get 8.
Maybe this could help you better understand how this is implemented in
cachetools
.The text was updated successfully, but these errors were encountered: