Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created December 29, 2015 23:40
Show Gist options
  • Select an option

  • Save ableasdale/be3cf1ba213fd07da69c to your computer and use it in GitHub Desktop.

Select an option

Save ableasdale/be3cf1ba213fd07da69c to your computer and use it in GitHub Desktop.
Group Level Cache settings template
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
declare variable $SIXTEENTH as xs:unsignedInt := 1024;
declare variable $EIGHTH as xs:unsignedInt := 2048;
declare variable $PARTITIONS as xs:unsignedInt := 1;
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
let $config := admin:group-set-expanded-tree-cache-size($config, $groupid, $EIGHTH)
let $config := admin:group-set-expanded-tree-cache-partitions($config, $groupid, $PARTITIONS)
let $config := admin:group-set-list-cache-size($config, $groupid, $EIGHTH)
let $config := admin:group-set-list-cache-partitions($config, $groupid, $PARTITIONS)
let $config := admin:group-set-compressed-tree-cache-size($config, $groupid, $SIXTEENTH)
let $config := admin:group-set-compressed-tree-cache-partitions($config, $groupid, $PARTITIONS)
return
admin:save-configuration($config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment