Clears now cache info of single repository.
| | |
| | | this.repoCacheAccess.clear(); |
| | | } |
| | | |
| | | public void clearRepoCacheAccess(Repository repository) { |
| | | log.info("Clearing repository cache '" + repository.getName() + "'..."); |
| | | this.repoCacheAccess.remove(repository.getName()); |
| | | } |
| | | |
| | | /** |
| | | * @param idOrName |
| | | * @return The repository (ensures that the list of archives is loaded). |
| | |
| | | public String getRepoArchiveList(@QueryParam("id") String id, @QueryParam("force") boolean force, |
| | | @QueryParam("prettyPrinter") boolean prettyPrinter) { |
| | | if (force) { |
| | | ButlerCache.getInstance().clearRepoCacheAccess(); |
| | | Repository repo = ButlerCache.getInstance().getRepository(id); |
| | | ButlerCache.getInstance().clearRepoCacheAccess(repo); |
| | | } |
| | | Repository repository = ButlerCache.getInstance().getRepositoryArchives(id); |
| | | return JsonUtils.toJson(repository, prettyPrinter); |