try {
@SuppressWarnings("unchecked")
Class<ServerCacheFactory> serverCacheFactoryClass =
(Class<ServerCacheFactory>) Class.forName(request.getCacheFactory().getClassName());
ServerCacheFactory cacheFactory = serverCacheFactoryClass.newInstance();
tenantCache.addServerCache(new ImmutableBytesPtr(request.getCacheId().toByteArray()),
cachePtr, cacheFactory);
} catch (Throwable e) {
ProtobufUtil.setControllerException(controller, new IOException(e));
}