## CouchbaseMapCacheClient

### Requirements

#### Couchbase Server 4.0 or higher is required for some operation using N1QL

Following cache operations require N1QL query, thus you need to deploy Couchbase Server 4.0 or higher for those operations. However, as of this writing (May 2017) there are only few processors using these operations. Most cache APIs are implemented using document id lookup and should work with older version of Couchbase Server.

- removeByPattern(String regex): This cache API removes entries by regex. Execute query like:

      delete from `cache-bucket-name` where REGEX_CONTAINS(meta().id, "^key.*")

In order to make N1QL work correctly you need to create a Primary index or an index covering N1QL queries performed by CouchbaseMapCacheClient. Please refer Couchbase Server documentations for how to create those.