mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
simplify cache api
This commit is contained in:
@@ -89,10 +89,8 @@ public abstract class CacheManagerTestBase<C extends Cache>
|
||||
@Test
|
||||
public void testSameReference()
|
||||
{
|
||||
Cache<String, String> c1 = cacheManager.getCache(String.class,
|
||||
String.class, "test-1");
|
||||
Cache<String, String> c2 = cacheManager.getCache(String.class,
|
||||
String.class, "test-1");
|
||||
Cache<String, String> c1 = cacheManager.getCache("test-1");
|
||||
Cache<String, String> c2 = cacheManager.getCache("test-1");
|
||||
|
||||
assertIsSame(c1, c2);
|
||||
}
|
||||
@@ -203,16 +201,16 @@ public abstract class CacheManagerTestBase<C extends Cache>
|
||||
@Override
|
||||
public Cache call() throws Exception
|
||||
{
|
||||
return cacheManager.getCache(String.class, String.class, name);
|
||||
return cacheManager.getCache(name);
|
||||
}
|
||||
|
||||
//~--- fields -------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private CacheManager cacheManager;
|
||||
private final CacheManager cacheManager;
|
||||
|
||||
/** Field description */
|
||||
private String name;
|
||||
private final String name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class CacheTestBase
|
||||
public void before()
|
||||
{
|
||||
cm = createCacheManager();
|
||||
cache = cm.getCache(String.class, String.class, "test");
|
||||
cache = cm.getCache("test");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user