Loading TOC...


   $scope as xs:string,
   [$pid as xs:string?]
) as empty-sequence()


This function unloads all application plugins from a given scope. Note that system plugins are unaffected by this function. Like plugin:initialize-scope, this function requires the application-plugin-registrar role.

scope A scope identifier. This must be a "dotted" package-style path, which will be resolved relative to the marklogic-dir/Assets/plugins directory. For example, a $scope value of my-plugin-scope is resolved to the marklogic-dir/Assets/plugins/myplugin-scope directory and a $scope value of my.plugin.scope is resolved to the marklogic-dir/Assets/plugins/my/plugin/scope directory.
pid A plugin ID.

Required Privileges

This function requires the privileges in the application-plugin-registrar role, and the best practice is to put plugin:flush-scope in a function that is amped to the application-plugin-registrar role.


xquery version "1.0-ml"; 
import module namespace plugin = "http://marklogic.com/extension/plugin" 
      at "/MarkLogic/plugin/plugin.xqy";


(: Unloads all of the plugins located in /Assets/plugins/marklogic/appservices :)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.