final Data keyData = toData(key);
final Data oldValueData = oldValue != null ? toData(oldValue) : null;
ClientRequest request;
InMemoryFormat inMemoryFormat = cacheConfig.getInMemoryFormat();
if (isGet) {
request = new CacheGetAndRemoveRequest(nameWithPrefix, keyData, inMemoryFormat);
} else {
request = new CacheRemoveRequest(nameWithPrefix, keyData, oldValueData, inMemoryFormat);
}
ICompletableFuture future;
try {