API Stability Preview

The setOrgDefaultCachePolicy() GraphQL mutation is used to set the default cache policy of the current organization. This policy will be applied to repositories within the current organizatio if a repository 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 setOrgDefaultCachePolicy() mutation field:

graphql
setOrgDefaultCachePolicy(
     input: SetOrgDefaultCachePolicyInput!
   ): boolean!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  setOrgDefaultCachePolicy( input:
    {
       policy: { prioritizeMillis: 1000 }
    }
  )
}
Example Responses
Show:
json
{
  "data": {
    "setOrgDefaultCachePolicy": true
  }
}

Given Datatypes

SetOrgDefaultCachePolicyInput has one parameter and a sub-parmeter. See the description below and the link to the sub-parameter table:

Table: SetOrgDefaultCachePolicyInput

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 19, 2024
policyCachePolicyInput  PreviewThe organization's default cache policy to set. See CachePolicyInput.