Hi, is there a way to check if an item exists without using "add" or "touch" or "get"?
There is a feature, currently undocumented (and thus unsupported) called stats key. It may be documented/supported soon, but you can certainly try it in a test environment to see if it works for you. This would allow you to get information about a given key without actually retrieving it. No stats on the key would mean it doesn't exist yet.
Of course, an add with expiration 1 is pretty close if you expect it to not really exist. I know that's not quite right though.
What is exactly the name of this undocumented feature, i couldn't find it?
It's simply an argument to the stats command for the key you want information on.
It's actually documented at a code level right here:
With Open Source, everything is technically documented. :)
Oh, and by the way, you can try it from either your client library or the commandline cbstats.
© 2013 COUCHBASE All rights reserved.