diff options
author | James Moger <james.moger@gitblit.com> | 2012-08-17 15:17:16 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-08-17 15:17:16 -0400 |
commit | fee0600989ccc271e3f3b44a06599682698c425f (patch) | |
tree | 9593d158915bbb14ffb1c46c9b94943f811e302a /src/com/gitblit/wicket/panels/RepositoriesPanel.java | |
parent | eb741abbb84437a08004bac2e219513400d9e56c (diff) | |
download | gitblit-fee0600989ccc271e3f3b44a06599682698c425f.tar.gz gitblit-fee0600989ccc271e3f3b44a06599682698c425f.zip |
Optionally cache repository list for improved performance
Diffstat (limited to 'src/com/gitblit/wicket/panels/RepositoriesPanel.java')
-rw-r--r-- | src/com/gitblit/wicket/panels/RepositoriesPanel.java | 11 |
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));
|