diff options
author | James Moger <james.moger@gitblit.com> | 2014-05-22 19:35:27 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-05-22 19:35:27 -0400 |
commit | 889bb73008ba5539edc1b19b678d1e850dc6e56c (patch) | |
tree | d2c8de24b66d08898c1eae823f274ea7d9a04a0f | |
parent | eeb12b8573338514329b5f4805ac594c1d1906e0 (diff) | |
download | gitblit-889bb73008ba5539edc1b19b678d1e850dc6e56c.tar.gz gitblit-889bb73008ba5539edc1b19b678d1e850dc6e56c.zip |
Fix cache miss on repository model retrieval
-rw-r--r-- | src/main/java/com/gitblit/manager/RepositoryManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java index 40e38640..71bce869 100644 --- a/src/main/java/com/gitblit/manager/RepositoryManager.java +++ b/src/main/java/com/gitblit/manager/RepositoryManager.java @@ -684,7 +684,8 @@ public class RepositoryManager implements IRepositoryManager { // http://stackoverflow.com/questions/17183110 repositoryName = repositoryName.replace("%7E", "~").replace("%7e", "~"); - if (!repositoryListCache.containsKey(repositoryName)) { + String repositoryKey = repositoryName.toLowerCase(); + if (!repositoryListCache.containsKey(repositoryKey)) { RepositoryModel model = loadRepositoryModel(repositoryName); if (model == null) { return null; @@ -694,7 +695,7 @@ public class RepositoryManager implements IRepositoryManager { } // cached model - RepositoryModel model = repositoryListCache.get(repositoryName.toLowerCase()); + RepositoryModel model = repositoryListCache.get(repositoryKey); if (gcExecutor.isCollectingGarbage(model.name)) { // Gitblit is busy collecting garbage, use our cached model |