-
Notifications
You must be signed in to change notification settings - Fork 12
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
TCG-2460 - Automatically refresh frequently used keys before they expire #24
Conversation
In my opinion the functionality you are adding should not be in the |
I pulled out the locking part, because as @chadicus pointed out that may work better at a different abstraction level. The part that measures runtime still needs to be here, so I left that. |
@chadicus Here is where I moved the locking part: https://github.com/traderinteractive/lib-predis-anti-stampede-php/pull/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I have two thoughts/considerations depending on how we want to approach backward compatibility.
- Should the default refreshPercent be 0 so the behavior does not change unexpectedly in cases where the refresh is not desirable for some reason?
- There could be an argument that these changes should be in a wrapper or extended class which would avoid the first issue.
I think the first issue would be easy enough but understand it would require us to do more work than just upgrade the library. I am open to other thoughts/opinions.
I set refreshPercent to default to 0. That should make it fully BC |
What does this PR do?
TCG-2460
Checklist