Caching enabled
This commit is contained in:
parent
7e4a40983e
commit
e0a3f88279
|
@ -17,6 +17,7 @@ import java.util.stream.IntStream;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.google.common.collect.ContiguousSet;
|
||||
import com.google.common.collect.DiscreteDomain;
|
||||
|
@ -28,6 +29,7 @@ import proxy.config.ConfigLoader;
|
|||
import proxy.config.UrlConfig;
|
||||
import proxy.config.exceptions.NoURLFound;
|
||||
|
||||
@Service
|
||||
public class RemoteFetcher {
|
||||
|
||||
|
||||
|
@ -49,6 +51,7 @@ public class RemoteFetcher {
|
|||
|
||||
@Cacheable("repositories")
|
||||
public List<Map<String, String>> getRepositories(String query) throws NoURLFound {
|
||||
System.out.println("NOT CACHED");
|
||||
List<UrlConfig> urlConfigs = configLoader.getExternalUrls().getRepositories().getUrls();
|
||||
return getAll(urlConfigs, query);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue