2

I'm trying to flush a memcached bucket in Couchbase using the Enyim client library.

using (var client = new MemcachedClient())
        {                                
            client.FlushAll();                
        }

This doesn't work as my next request is still returning data from the cache.

This does work if i explicity call remove as below

using (var client = new MemcachedClient())
        {                
            client.Remove(key);
        }

But I want a way to invalidate all of the items in the bucket as they will be invalidated by an external data load.

NB. Initiating a flush on the bucket from the Couchbase admin web app does have the desired outcome.

Why does it not work in Enyim?

obaylis
  • 2,904
  • 4
  • 39
  • 66
  • 2
    What version of the client are you using? Have you considered updating to the latest Couchbase SDK? https://www.nuget.org/packages/CouchbaseNetClient/ – jeffrymorris Aug 22 '16 at 17:05
  • Yes that is what we have now done. Originally I thought Enyim was faster than the Couchbase SDK but I was not using the ClusterHelper which made a big difference. – obaylis Aug 23 '16 at 08:22

0 Answers0