Flushing the cache
I have a few questions about flushing a bucket that I have not been able to answer via the documentation.
1. What is the best way to get rid of all records in Couchbase?
2. When flushing a bucket via the Java CouchbaseClient, does the flush method documented in the Java Client Manual flush ALL records from memory and disk or does it flush just the memory? The manual and JavaDoc says it "clears the cache on all servers", but that documentation is inherited from the MemcacheClient.
3. Section 1.8 in the manual talks about the REST api for flushing a bucket, which is disabled by default in version 1.8.1. However, it does not mention anything about the flush_all command from client libraries. Does the flush method in the Java client still work by default?
With #1, the best way is actually to delete the bucket. Do be aware that there is an open issue that this is asynchronous, so you'll want to wait a little while before recreating the bucket.
With #2, that's the flush_all command and it would flush all data from the bucket, if the server would let it. We'll update the documentation.
With #3, the 'disabled by default' change in 1.8.1 applies to flush whether initiated through the web console or as a command issued by a client library.
Hope that helps!