Skip to content
Snippets Groups Projects
Commit 20a240cf authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

revert general cache changes

parent 9c04ae44
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!499Spring config update
Pipeline #7365 failed
......@@ -32,7 +32,7 @@ public class GeneralCache implements GeneralCacheInterface {
* Application level cache. More information can be found
* {@link ApplicationLevelCache here}.
*/
private QueryCacheInterface cache1;
private QueryCacheInterface cache1 = ApplicationLevelCache.getInstance();
/**
* Database level cache. More information can be found
......@@ -44,9 +44,7 @@ public class GeneralCache implements GeneralCacheInterface {
* Constructor
*/
@Autowired
public GeneralCache(@Qualifier(value = "applicationLevelCache") QueryCacheInterface cache1,
@Qualifier(value = "permanentDatabaseLevelCache") QueryCacheInterface cache2) {
this.cache1 = cache1;
public GeneralCache(@Qualifier(value = "permanentDatabaseLevelCache") QueryCacheInterface cache2) {
this.cache2 = cache2;
}
......
......@@ -59,7 +59,7 @@ public class CachableInterfaceTest extends AnnotationTestFunctions {
CacheTypeDao mock = Mockito.mock(CacheTypeDao.class);
when(mock.getByClassName(anyString())).thenReturn(new CacheType());
ci.setCacheTypeDao(mock);
ci.setCache(new GeneralCache(null, null));
ci.setCache(new GeneralCache(null));
String cacheKey = "https://www.google.com/";
String result = ci.getWebPageContent(cacheKey);
......@@ -82,7 +82,7 @@ public class CachableInterfaceTest extends AnnotationTestFunctions {
ci.setCacheTypeDao(mock);
String xml = "<xml><child/></xml>";
ci.setCache(new GeneralCache(null, null));
ci.setCache(new GeneralCache(null));
ci.setCacheNode("id", super.getNodeFromXmlString(xml));
Node node = ci.getCacheNode("id");
......
......@@ -19,7 +19,7 @@ import lcsb.mapviewer.model.cache.CacheType;
public class GeneralCacheTest extends AnnotationTestFunctions {
Logger logger = Logger.getLogger(GeneralCacheTest.class);
GeneralCache cache = new GeneralCache(null, null);
GeneralCache cache = new GeneralCache(null);
@Autowired
PermanentDatabaseLevelCacheInterface databaseLevelCache;
......
......@@ -44,7 +44,7 @@ public class GeneralCacheWithExclusionTest extends AnnotationTestFunctions {
public void testExclusion() throws Exception {
try {
CacheType type = new CacheType();
GeneralCache cache = new GeneralCache(null, null);
GeneralCache cache = new GeneralCache(null);
cache.setCache2(ApplicationLevelCache.getInstance());
GeneralCacheWithExclusion cacheWithExclusion = new GeneralCacheWithExclusion(cache, 2);
......@@ -67,7 +67,7 @@ public class GeneralCacheWithExclusionTest extends AnnotationTestFunctions {
public void testClear() throws Exception {
try {
CacheType type = new CacheType();
GeneralCache cache = new GeneralCache(null, null);
GeneralCache cache = new GeneralCache(null);
cache.setCache2(ApplicationLevelCache.getInstance());
GeneralCacheWithExclusion cacheWithExclusion = new GeneralCacheWithExclusion(cache, 0);
......@@ -90,7 +90,7 @@ public class GeneralCacheWithExclusionTest extends AnnotationTestFunctions {
public void testRemove() throws Exception {
try {
CacheType type = new CacheType();
GeneralCache cache = new GeneralCache(null, null);
GeneralCache cache = new GeneralCache(null);
cache.setCache2(ApplicationLevelCache.getInstance());
GeneralCacheWithExclusion cacheWithExclusion = new GeneralCacheWithExclusion(cache, 0);
......@@ -114,7 +114,7 @@ public class GeneralCacheWithExclusionTest extends AnnotationTestFunctions {
public void testInvalidate() throws Exception {
try {
CacheType type = new CacheType();
GeneralCache cache = new GeneralCache(null, null);
GeneralCache cache = new GeneralCache(null);
cache.setCache2(ApplicationLevelCache.getInstance());
GeneralCacheWithExclusion cacheWithExclusion = new GeneralCacheWithExclusion(cache, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment