mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MOB-659 (part 1 of 2) - improve namespace cache reset (should work even with null / cache)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13949 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -39,6 +39,7 @@ import net.sf.ehcache.CacheManager;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.cache.EhCacheAdapter;
|
||||
import org.alfresco.repo.dictionary.NamespaceDAOImpl.NamespaceData;
|
||||
import org.alfresco.repo.dictionary.constraint.RegexConstraint;
|
||||
import org.alfresco.repo.dictionary.constraint.StringLengthConstraint;
|
||||
import org.alfresco.repo.tenant.SingleTServiceImpl;
|
||||
@@ -125,19 +126,12 @@ public class DictionaryDAOTest extends TestCase
|
||||
{
|
||||
CacheManager cacheManager = new CacheManager();
|
||||
|
||||
Cache urisEhCache = new Cache("urisCache", 50, false, true, 0L, 0L);
|
||||
cacheManager.addCache(urisEhCache);
|
||||
EhCacheAdapter<String, List<String>> urisCache = new EhCacheAdapter<String, List<String>>();
|
||||
urisCache.setCache(urisEhCache);
|
||||
Cache namespaceEhCache = new Cache("namespaceCache", 50, false, true, 0L, 0L);
|
||||
cacheManager.addCache(namespaceEhCache);
|
||||
EhCacheAdapter<String, NamespaceData> namespaceCache = new EhCacheAdapter<String, NamespaceData>();
|
||||
namespaceCache.setCache(namespaceEhCache);
|
||||
|
||||
namespaceDAO.setUrisCache(urisCache);
|
||||
|
||||
Cache prefixesEhCache = new Cache("prefixesCache", 50, false, true, 0L, 0L);
|
||||
cacheManager.addCache(prefixesEhCache);
|
||||
EhCacheAdapter<String, Map<String, String>> prefixesCache = new EhCacheAdapter<String, Map<String, String>>();
|
||||
prefixesCache.setCache(prefixesEhCache);
|
||||
|
||||
namespaceDAO.setPrefixesCache(prefixesCache);
|
||||
namespaceDAO.setNamespaceDataCache(namespaceCache);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user