I modified the clear cache script to delete caches from all repositories, it works fine for me, but even if I run this script the Activity tab is not refreshed. Is there something wrong, is it possible to do it like this?
import sonia.scm.*;
import sonia.scm.cache.*;
import sonia.scm.repository.*;
import sonia.scm.repository.api.*;
// identify your repository
//def type = "git";
//def name = "PPCR_TC.git";
def repositoryManager = injector.getInstance(RepositoryManager.class);
//def repository = repositoryManager.get(type, name);
def AllRepositories = repositoryManager.getAll().toArray().name;
for (def repository : AllRepositories) {
println "Clear cache for repository " + repository;
def cacheManager = injector.getInstance(CacheManager.class);
def caches = [
cacheManager.getCache(BlameCommandBuilder.CacheKey.class, BlameResult.class, BlameCommandBuilder.CACHE_NAME),
cacheManager.getCache(BrowseCommandBuilder.CacheKey.class, BrowserResult.class, BrowseCommandBuilder.CACHE_NAME),
cacheManager.getCache(LogCommandBuilder.CacheKey.class, ChangesetPagingResult.class, LogCommandBuilder.CACHE_NAME),
cacheManager.getCache(TagsCommandBuilder.CacheKey.class, Tags.class, TagsCommandBuilder.CACHE_NAME),
cacheManager.getCache(BranchesCommandBuilder.CacheKey.class, Branches.class, BranchesCommandBuilder.CACHE_NAME)
];
def filter = new RepositoryFilter(repository);
for (def cache : caches){
cache.removeAll(filter);
}
}
Thanks & regards
Jakub
Dne úterý, 30. dubna 2013 8:46:16 UTC+2 Sebastian Sdorra napsal(a):