---
schema_version: "1"
id: abe4b2442f41b628db89e3a29e9c501ee588a67d430e86dbd4a86d864be057d6
title: PlatformCachePartition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_platformcachepartition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_platformcachepartition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e540f99511f03534f5b5c57495c088780945563b8de2e2d132bc49dc024d6d7b
description: Represents a partition in the Platform Cache. This type extends the Metadata metadata type and inherits its fullName field.
---
# PlatformCachePartition

Represents a partition in the Platform Cache. This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## File Suffix and Directory Location

PlatformCachePartition components have the suffix .cachePartition and are stored in the cachePartitions folder.

## Version

PlatformCachePartition components are available in API version 35.0 and later.

## Special Access Rules

The “Author Apex” permission is required to deploy and retrieve PlatformCachePartition components.

## Fields

| Field Name | Field Type | Description |
| --- | --- | --- |
| description | string | Describes the cache partition. |
| isDefaultPartition | boolean | Required. Indicates whether this cache partition is the default partition in your organization (true) or not (false). |
| masterLabel | string | Required. The label of the cache partition that appears in the Salesforce user interface. |
| platformCachePartitionTypes | [PlatformCachePartitionType](#PlatformCachePartitionType)\[\] | An array of cache types that the partition can store. |

## PlatformCachePartitionType

Contains information about a partition type, including its minimum and allocated capacity.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d748003e199">Field Name</th>

              <th class="featureTableHeader  " id="d748003e202">Field Type</th>

              <th class="featureTableHeader  " id="d748003e205">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d748003e199" data-title="Field Name"><span class="keyword parmname" id="meta_pc_allocated"><a name="meta_pc_allocated"><!-- --></a>allocatedCapacity</span></td>

              <td class="entry" headers="d748003e202" data-title="Field Type">int</td>

              <td class="entry" headers="d748003e205" data-title="Description">Required. The total storage capacity, in megabytes (MB), that is allocated for
                the cache type, including free, purchased, and trial cache. Purchased capacity
                includes organization-wide cache, which can be used in any partition, and
                namespace-specific cache, which can be used only in partitions associated with a
                namespace.</td>

            </tr>

            <tr>
              <td class="entry" headers="d748003e199" data-title="Field Name"><span class="keyword parmname" id="meta_pc_allocated_partner"><a name="meta_pc_allocated_partner"><!-- --></a>allocatedPartnerCapacity</span></td>

              <td class="entry" headers="d748003e202" data-title="Field Type">int</td>

              <td class="entry" headers="d748003e205" data-title="Description">Required. Free capacity, in megabytes (MB). allocated to Developer Edition orgs
                for the cache type. Use this capacity with security-reviewed managed packages.
                Available in API version 51.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d748003e199" data-title="Field Name"><span class="keyword parmname" id="meta_pc_allocated_purchased"><a name="meta_pc_allocated_purchased"><!-- --></a>allocatedPurchasedCapacity</span></td>

              <td class="entry" headers="d748003e202" data-title="Field Type">int</td>

              <td class="entry" headers="d748003e205" data-title="Description">Required. <span class="ph" id="meta_pc_allocated_purchased_desc"><a name="meta_pc_allocated_purchased_desc"><!-- --></a>The amount of
                  namespace-specific purchased storage capacity, in MB, that is allocated for the
                  cache type.</span>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d748003e199" data-title="Field Name"><span class="keyword parmname" id="meta_pc_allocated_trial"><a name="meta_pc_allocated_trial"><!-- --></a>allocatedTrialCapacity</span></td>

              <td class="entry" headers="d748003e202" data-title="Field Type">int</td>

              <td class="entry" headers="d748003e205" data-title="Description">Required. <span class="ph" id="meta_pc_allocated_trial_desc"><a name="meta_pc_allocated_trial_desc"><!-- --></a>The amount of trial cache
                  space, in MB, that is allocated for the cache type.</span>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d748003e199" data-title="Field Name"><span class="keyword parmname">cacheType</span></td>

              <td class="entry" headers="d748003e202" data-title="Field Type">PlatformCacheType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d748003e205" data-title="Description">The type of cache. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Session</samp>—Session cache
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Organization</samp>—Org cache
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a PlatformCachePartition component.

<?xml version="1.0" encoding="UTF-8"?>
<PlatformCachePartition xmlns="http://soap.sforce.com/2006/04/metadata">
    <description\>Custom partition and marked as default.</description\>
    <isDefaultPartition\>true</isDefaultPartition\>
    <masterLabel\>myPartition</masterLabel\>
    <platformCachePartitionTypes\>
   ​​     <​allocatedCapacity>10</​allocatedCapacity>
​​        <​​allo​ca​tedPurchasedCapacity>5</​​allo​ca​tedPurchasedCapacity>
        <cacheType\>Session</cacheType\>
    </platformCachePartitionTypes\>
    <platformCachePartitionTypes\>
    ​​    <​allocatedCapacity>5</​allocatedCapacity>
​​        <​​allo​ca​tedPurchasedCapacity>5</​​allo​ca​tedPurchasedCapacity>
        <cacheType\>Organization</cacheType\>
    </platformCachePartitionTypes\>​
</PlatformCachePartition\> 

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>myPartition</members\>
        <name\>PlatformCachePartition</name\>
    </types\>
    <version\>68.0</version\>
</Package\>

If a namespace is defined in your organization, add the namespace prefix to your partition name. For example:

<members\>Namespace.myPartition</members\>

To retrieve all cache partitions from your organization, use the wildcard character (\*) as follows.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>PlatformCachePartition</name\>
    </types\>
    <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).