Created
August 21, 2014 19:57
-
-
Save matthewbednarski/d9c8d8a24e3040cc2555 to your computer and use it in GitHub Desktop.
clear scm-manager's caches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// taken from | |
// https://groups.google.com/forum/#!topic/scmmanager/tvfhJWDlTO8 | |
// requires the scm-manager plugin scm-script-plugin | |
import sonia.scm.*; | |
import sonia.scm.cache.*; | |
import sonia.scm.repository.*; | |
import sonia.scm.repository.api.*; | |
import sonia.scm.activity.ActivityManager; | |
import sonia.scm.activity.ActivitySet; | |
import sonia.scm.activity.Activities; | |
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), | |
cacheManager.getCache(String.class, ActivitySet.class, ActivityManager.CACHE_REPOSITORY), | |
cacheManager.getCache(String.class, Activities.class, ActivityManager.CACHE_USER) | |
]; | |
for (def cache : caches){ | |
cache.clear(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment