Description
Cache eviction is not taking into account the scope and collection, only the bucket. The problem seems to be in the DefaultCouchbaseCacheWriter.clear(String) method.
public long clear(final String pattern) {
QueryResult result = clientFactory.getCluster().query(
"DELETE FROM " + clientFactory.getBucket().name() + "
where meta().id LIKE $pattern",
queryOptions().metrics(true).parameters(JsonObject.create().put("pattern", pattern + "%")));
return result.metaData().metrics().map(QueryMetrics::mutationCount).orElse(0L);
}