Skip to content

Cache Eviction not working #1369

@the-wrangler17

Description

@the-wrangler17

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);
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions