mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
create static read method for GuavaCacheConfigurationReader
This commit is contained in:
@@ -33,6 +33,7 @@ package sonia.scm.cache;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
@@ -67,9 +68,18 @@ public class GuavaCacheManager implements CacheManager
|
||||
*/
|
||||
public GuavaCacheManager()
|
||||
{
|
||||
GuavaCacheConfigurationReader reader = new GuavaCacheConfigurationReader();
|
||||
GuavaCacheManagerConfiguration config = reader.read();
|
||||
this(GuavaCacheConfigurationReader.read());
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs ...
|
||||
*
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
@VisibleForTesting
|
||||
protected GuavaCacheManager(GuavaCacheManagerConfiguration config)
|
||||
{
|
||||
defaultConfiguration = config.getDefaultCache();
|
||||
|
||||
for (GuavaNamedCacheConfiguration ncc : config.getCaches())
|
||||
|
||||
Reference in New Issue
Block a user