admin.groupSetCacheSizing( config as element(configuration), group-id as (Number|String), value as String ) as element(configuration)
This function sets the cache sizing method. You can set the cache sizing method to
enable you to manually set the settings for your caches, or have MarkLogic
automatically set the cache settings. If you select automatic
,
MarkLogic automatically sizes the caches based on the available memory resources
allocated at startup time. If you select enode
, MarkLogic
automatically sizes the caches, but the sizes are tuned for better memory utilization
of an Evaluation Node. If you select dnode
, MarkLogic automatically
sizes the caches as well, but the sizes are tuned for better memory utilization
of a Data Node. When the Cache Sizing method is set to automatic
,
enode
, or dnode
, all cache settings, such as List Cache Size,
Compressed Tree Cache Size and so on, are set in the group configuration, but are not
used until the Cache Sizing method is set to manual
.
Switching the cache sizing method from manual
to automatic
,
enode
, or dnode
restarts MarkLogic Server.
Switching from automatic
, enode
, or dnode
to
manual
restarts MarkLogic Server if the current configuration does not
match the saved configuration. Otherwise, MarkLogic Server does not restart.
const admin = require('/MarkLogic/admin.xqy'); const config = admin.getConfiguration() const groupid = admin.groupGetId(config, "Default") admin.groupSetCacheSizing(config, groupid, "automatic") //Sets the cache sizing method to "automatic."
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.