The internet seems to be fairly void of information or documentation about the Enyim Increment method. I cant quite figure out what it is doing. The documentation states:
Increment(string key, ulong defaultValue, ulong delta);
"Increments the value of the specified key by the given amount. Operation happens atomically on the server."
This sounds all well and good if I could get it to work.
Though nobody has many clear answers, the consensus seems to be that the method is supposed to set the value to the given default value, should the key not exist in memcached. However, I cant for the life of me get a key to store to a default value.
I don't want to use a (store + increment) combo because it needs to be used across a multi-server architecture and I could not guarantee the operation would be atomic.
Any ideas or pointers on how to successfully increment the value of a memcached key? A super bonus would be to also have the default value have a time to live as well.
Edit: I have tried this in both the "Text" and "Binary" protocols and cant seem to get it to set a default value in either setting.
Thanks in advance for the help!