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/RpcServlet.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/RpcServlet.java')
-rw-r--r-- | src/com/gitblit/RpcServlet.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/gitblit/RpcServlet.java b/src/com/gitblit/RpcServlet.java index 31ee5ad0..929e9cc6 100644 --- a/src/com/gitblit/RpcServlet.java +++ b/src/com/gitblit/RpcServlet.java @@ -49,7 +49,7 @@ public class RpcServlet extends JsonServlet { private static final long serialVersionUID = 1L;
- public static final int PROTOCOL_VERSION = 3;
+ public static final int PROTOCOL_VERSION = 4;
public RpcServlet() {
super();
@@ -319,6 +319,13 @@ public class RpcServlet extends JsonServlet { } else {
response.sendError(notAllowedCode);
}
+ } else if (RpcRequest.CLEAR_REPOSITORY_CACHE.equals(reqType)) {
+ // clear the repository list cache
+ if (allowAdmin) {
+ GitBlit.self().resetRepositoryListCache();
+ } else {
+ response.sendError(notAllowedCode);
+ }
}
// send the result of the request
|