@@ -31,7 +31,11 @@ public final class FirebaseFirestoreSettings {
31
31
@ PublicApi public static final long CACHE_SIZE_UNLIMITED = -1 ;
32
32
33
33
private static final long MINIMUM_CACHE_BYTES = 1 * 1024 * 1024 ; // 1 MB
34
- private static final long DEFAULT_CACHE_SIZE_BYTES = 100 * 1024 * 1024 ; // 100 MB
34
+ // TODO(b/121269744): Set this to be the default value after SDK is past version 1.0
35
+ //private static final long DEFAULT_CACHE_SIZE_BYTES = 100 * 1024 * 1024; // 100 MB
36
+ // For now, we are rolling this out with collection disabled. Once the SDK has hit version 1.0,
37
+ // we will switch the default to the above value, 100 MB.
38
+ private static final long DEFAULT_CACHE_SIZE_BYTES = CACHE_SIZE_UNLIMITED ;
35
39
private static final String DEFAULT_HOST = "firestore.googleapis.com" ;
36
40
private static final boolean DEFAULT_TIMESTAMPS_IN_SNAPSHOTS_ENABLED = false ;
37
41
@@ -140,8 +144,9 @@ public Builder setTimestampsInSnapshotsEnabled(boolean value) {
140
144
* guarantee that the cache will stay below that size, only that if the cache exceeds the given
141
145
* size, cleanup will be attempted.
142
146
*
143
- * <p>The default value is 100 MB. The threshold must be set to at least 1 MB, and can be set to
144
- * {@link FirebaseFirestoreSettings#CACHE_SIZE_UNLIMITED} to disable garbage collection.
147
+ * <p>By default, collection is disabled (the value is set to
148
+ * {@link FirebaseFirestoreSettings#CACHE_SIZE_UNLIMITED}). In a future release, collection will
149
+ * be enabled by default, with a default cache size of 100 MB. The minimum value is 1 MB.
145
150
*
146
151
* @return A settings object on which the cache size is configured as specified by the given
147
152
* {@code value}.
0 commit comments