protected Cache<NodeKey, CachedNode> cacheForWorkspace( String name ) {
Cache<NodeKey, CachedNode> cache = workspaceCacheManager.getCache(cacheNameForWorkspace(name));
if (cache instanceof AdvancedCache) {
TransactionManager txManager = ((AdvancedCache<?, ?>)cache).getTransactionManager();
if (txManager != null) {
throw new ConfigurationException(JcrI18n.workspaceCacheShouldNotBeTransactional.text(name));
}
}
return cache;
}