Disabling the change cache by default.

Since the change cache can mess-up multi-server setups,
it is now disabled by default.

Change-Id: Ia8dc83f675bbfc1f6467cfed29a964554e2b1951
This commit is contained in:
Gustaf Lundh
2012-11-18 18:41:15 -08:00
parent 5367b8bab5
commit 53493773f5
2 changed files with 10 additions and 6 deletions

View File

@@ -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"`::

View File

@@ -48,7 +48,7 @@ public class ChangeCache implements GitReferenceUpdatedListener {
cache(ID_CACHE,
Project.NameKey.class,
new TypeLiteral<List<Change>>() {})
.maximumWeight(1024)
.maximumWeight(0)
.loader(Loader.class);
}
};