assert name != null;
assert !this.workspaceNames.contains(name);
WorkspaceCache removed = this.workspaceCachesByName.remove(name);
if (removed != null) {
try {
removed.signalDeleted();
sessionContext.getTransactionalWorkspaceCacheFactory().remove(name);
} finally {
if (workspaceCacheManager instanceof EmbeddedCacheManager) {
((EmbeddedCacheManager)workspaceCacheManager).removeCache(cacheNameForWorkspace(name));
}