-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
adding more than the maximum capacity limit returns a Boolean value #31
Comments
Hi, that's an interesting suggestion. A similar change is planned, largely because of this otter remains under development. But I intended to return a bool to show if an item was accepted for processing here (maybe more conditions later). There are a few problems with your proposal.
|
|
|
Add return a boolean value when setting a key-value item with too high a cost.
Add return a boolean value when setting a key-value item with too high a cost.
So far I've only added returning a boolean value for items with too high a cost, but I'd like to know why you need the mechanics you suggest. |
@UallenQbit Unfortunately, there are two problems with this at once.
|
I really don't know how to satisfy this issue without a huge loss in performance (even leaving the convenience of the other users out of the discussion). |
#clarificationandmotivation
Use Set and SetWithTTL to return false if the Key setting exceeds the maximum capacity of NewCache and fails.
#Acceptance criteria
For example, if I use NewCache to set the maximum capacity to 3, and I set 4 Keys, the first three keys will return true if they do not exceed the maximum capacity limit, and the fourth key will return false if they exceed the maximum capacity limit.
The text was updated successfully, but these errors were encountered: