Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 54055fb

Browse files
Update documentation for CacheSizeMB
1 parent bfaf2b3 commit 54055fb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ func WithMaxEdgeTraversal(max int) ClientOpt {
143143
}
144144
}
145145

146-
// WithCacheSizeMB sets the memory cache size in MB (only applicable for embedded databases)
146+
// WithCacheSizeMB sets the memory cache size in MB (only applicable for embedded databases).
147+
// A good starting point for a system with a moderate amount of RAM (e.g., 8-16GB) would be
148+
// between 256 MB and 1 GB. Dgraph itself often defaults to a 1GB cache. In order to minimize
149+
// resource usage sans configuration, the default is set to 64 MB.
147150
func WithCacheSizeMB(size int) ClientOpt {
148151
return func(o *clientOptions) {
149152
o.cacheSizeMB = size

0 commit comments

Comments
 (0)