The setGlobalDefaultCachePolicy() GraphQL mutation field is used to set the global default cache policy. This policy will be applied to a repository if neither a repository or organization cache policy is set. This field is not yet available. It's described here as a preview. Cache policies are a limited feature and is subject to change.

For information on configuring a cache, see the CACHE_STORAGE_DIRECTORY reference page.

Syntax

Below is the syntax for the setGlobalDefaultCachePolicy() mutation field:

setGlobalDefaultCachePolicy(input: SetGlobalDefaultCachePolicyInput!): boolean!

Given Datatypes

For the given datatype, SetGlobalDefaultCachePolicyInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: SetGlobalDefaultCachePolicyInput

ParameterTypeRequired[a]DefaultDescription
policystring  The global default cache policy to set.
viewNamestringyes The name of the view related to the saved query.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.