summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/manager')
-rw-r--r--src/main/java/com/gitblit/manager/GitblitManager.java5
-rw-r--r--src/main/java/com/gitblit/manager/IRepositoryManager.java8
-rw-r--r--src/main/java/com/gitblit/manager/RepositoryManager.java12
3 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/manager/GitblitManager.java b/src/main/java/com/gitblit/manager/GitblitManager.java
index 5b16ef66..2782e724 100644
--- a/src/main/java/com/gitblit/manager/GitblitManager.java
+++ b/src/main/java/com/gitblit/manager/GitblitManager.java
@@ -929,6 +929,11 @@ public class GitblitManager implements IGitblit {
}
@Override
+ public void resetRepositoryCache(String repositoryName) {
+ repositoryManager.resetRepositoryCache(repositoryName);
+ }
+
+ @Override
public List<String> getRepositoryList() {
return repositoryManager.getRepositoryList();
}
diff --git a/src/main/java/com/gitblit/manager/IRepositoryManager.java b/src/main/java/com/gitblit/manager/IRepositoryManager.java
index fd5fc14b..69177f1e 100644
--- a/src/main/java/com/gitblit/manager/IRepositoryManager.java
+++ b/src/main/java/com/gitblit/manager/IRepositoryManager.java
@@ -159,6 +159,14 @@ public interface IRepositoryManager extends IManager {
void resetRepositoryListCache();
/**
+ * Reset all caches for this repository.
+ *
+ * @param repositoryName
+ * @since 1.5.1
+ */
+ void resetRepositoryCache(String repositoryName);
+
+ /**
* Returns the list of all repositories available to Gitblit. This method
* does not consider user access permissions.
*
diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java
index a76787bb..7351eb97 100644
--- a/src/main/java/com/gitblit/manager/RepositoryManager.java
+++ b/src/main/java/com/gitblit/manager/RepositoryManager.java
@@ -455,6 +455,18 @@ public class RepositoryManager implements IRepositoryManager {
}
/**
+ * Reset all caches for this repository.
+ *
+ * @param repositoryName
+ * @since 1.5.1
+ */
+ @Override
+ public void resetRepositoryCache(String repositoryName) {
+ removeFromCachedRepositoryList(repositoryName);
+ clearRepositoryMetadataCache(repositoryName);
+ }
+
+ /**
* Resets the repository list cache.
*
*/