CouchbaseBucket InvalidateQueryCache Method Couchbase .NET SDK 2.3.3
Invalidates and clears the query cache. This method can be used to explicitly clear the internal N1QL query cache. This cache will be filled with non-adhoc query statements (query plans) to speed up those subsequent executions. Triggering this method will wipe out the complete cache, which will not cause an interruption but rather all queries need to be re-prepared internally. This method is likely to be deprecated in the future once the server side query engine distributes its state throughout the cluster.

Namespace: Couchbase
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: (
public int InvalidateQueryCache()

Return Value

Type: Int32
An Int32 representing the size of the cache before it was cleared.


IQueryCacheInvalidator InvalidateQueryCache 
See Also