-
Notifications
You must be signed in to change notification settings - Fork 94
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
cached: Add sync_writes_by_key #226
base: master
Are you sure you want to change the base?
Conversation
@jaemk Can you review this? I tried to keep the changes very minimal. The only thing I am not sure about is whether we need to worry about cleaning up the hashmap. Also I haven't tested with Redis cache storages, could there be a problem with redis? |
What's the use case of |
Good point. I guess there could still be a use case where you want to lock a method independently of the key. |
Thanks for clarification. |
a1d0f40
to
f8dce37
Compare
Applied all the refactorings 👍 |
f8dce37
to
f9e6099
Compare
have to rewrite tests ..... |
f9e6099
to
f21e6d1
Compare
f21e6d1
to
e513e1c
Compare
e513e1c
to
1e8e0d8
Compare
Sync Writes by Key
This PR implements the
sync_writes_by_key
attribute, which works likesync_writes
, but uses an individual lock per key.This way you can call a method concurrently with different cache keys without locking the method (globally).
Related Issues: