summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/panels/RepositoriesPanel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/gitblit/wicket/panels/RepositoriesPanel.java')
-rw-r--r--src/com/gitblit/wicket/panels/RepositoriesPanel.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
index 9664e05b..8c8e1e5e 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java
+++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -54,6 +54,7 @@ import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.BasePage;
import com.gitblit.wicket.pages.EditRepositoryPage;
import com.gitblit.wicket.pages.EmptyRepositoryPage;
+import com.gitblit.wicket.pages.RepositoriesPage;
import com.gitblit.wicket.pages.SummaryPage;
public class RepositoriesPanel extends BasePanel {
@@ -73,6 +74,16 @@ public class RepositoriesPanel extends BasePanel {
final IDataProvider<RepositoryModel> dp;
Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this);
+ adminLinks.add(new Link<Void>("clearCache") {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick() {
+ GitBlit.self().resetRepositoryListCache();
+ setResponsePage(RepositoriesPage.class);
+ }
+ }.setVisible(GitBlit.getBoolean(Keys.git.cacheRepositoryList, true)));
adminLinks.add(new BookmarkablePageLink<Void>("newRepository", EditRepositoryPage.class));
add(adminLinks.setVisible(showAdmin));