Closed rixmann closed 8 years ago
Thanks for the pull.
Once I saw your mail, and glanced at the code, my idea was similar, but I'd do it in a slightly different way. A problem with doing this in the ConCache.Owner
is that we're needlessly sending a message to the process, even though we could decide earlier that there's no need to update ttl.
So instead, I'd add a clause here which does nothing if ttl is :no_update
.
Moreover, you need to adapt this typespec to indicate that ttl
can be pos_integer | :no_update
.
We also need to document :no_update
.
And finally, we need some tests for this :-)
updated :)
i will use it this way for myself, test and documentation will be added later
Looks better. I'll do the proper check sometimes this weekend. Thanks!
OK, I took a closer look at the code, and it looks good. So we only need test, and a note in ConCache.Item
that explains the new option.
@rixmann I wanted to check the status of this. I'm basically happy with the change, but we're still missing tests and docs. If you don't have time for that, I could do it myself.
i did not really check for the tests ... you used the wording "proper" check - so i thought there was some more sophisitcated property based checking ;)
should be fine now
Great, thanks! I'll take a look later today.
Thank you for contributing!
In %ConCache.Item{ttl: :no_update} can be set to omit touching the entries ttl even when updating/putting.