Performance tweak

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6802 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-17 16:26:19 +00:00
parent 519cec7965
commit 088b452b50

View File

@@ -309,7 +309,7 @@ public class DictionaryDAOImpl implements DictionaryDAO
if (models == null) if (models == null)
{ {
models = new ArrayList<CompiledModel>(); models = new ArrayList<CompiledModel>();
getUriToModels().put(uri, models); getUriToModels(tenantDomain).put(uri, models);
} }
if (!models.contains(model)) if (!models.contains(model))
{ {
@@ -384,7 +384,7 @@ public class DictionaryDAOImpl implements DictionaryDAO
return models; return models;
} }
List<CompiledModel> models = getUriToModels().get(uri); List<CompiledModel> models = getUriToModels("").get(uri);
if (models == null) if (models == null)
{ {
models = Collections.emptyList(); models = Collections.emptyList();
@@ -850,16 +850,6 @@ public class DictionaryDAOImpl implements DictionaryDAO
writeLock.unlock(); writeLock.unlock();
} }
} }
/**
* Get uriToModels from the cache (in the context of the current user's tenant domain)
*
* @param tenantDomain
*/
private Map<String, List<CompiledModel>> getUriToModels()
{
return getUriToModels(tenantService.getCurrentUserDomain());
}
/** /**
* Get uriToModels from the cache (in the context of the given tenant domain) * Get uriToModels from the cache (in the context of the given tenant domain)