diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 03be00931b..b20b46bdf9 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -478,11 +478,15 @@ the first request into the second to ensure it can complete. cache `"changes"`:: + -Each item caches all changes tied to one project. Default size -is 1024, which means all changes for up to 1024 projects can be held -in the cache. This cache should probably be disabled in a multi-master -setup where change updates are not communicated between servers. The -cache should be flushed whenever the database changes table is modified +The size determines the number of projects that will have all its changes +cached. If the cache is set to 1024, this means all changes for up to +1024 projects can be held in the cache. ++ +Default size is 0 (disabled). It is disabled by default due to the fact +that change updates are not communicated between Gerrit servers. +Hence this cache should be disabled in an multi-master/multi-slave setup. ++ +The cache should be flushed whenever the database changes table is modified outside of gerrit. cache `"diff"`:: diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeCache.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeCache.java index bf2a19ff73..6f71936137 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeCache.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ChangeCache.java @@ -48,7 +48,7 @@ public class ChangeCache implements GitReferenceUpdatedListener { cache(ID_CACHE, Project.NameKey.class, new TypeLiteral>() {}) - .maximumWeight(1024) + .maximumWeight(0) .loader(Loader.class); } };