Newer Version Available
PlatformCachePartition
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[] | An array of cache types that the partition can store. |
PlatformCachePartitionType
Contains information about a partition type, including its minimum and allocated capacity.
| Field Name | Field Type | Description |
|---|---|---|
| allocatedCapacity | int | 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. |
| allocatedPartnerCapacity | int | 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. |
| allocatedPurchasedCapacity | int | Required. The amount of namespace-specific purchased storage capacity, in MB, that is allocated for the cache type. |
| allocatedTrialCapacity | int | Required. The amount of trial cache space, in MB, that is allocated for the cache type. |
| cacheType | PlatformCacheType (enumeration of type string) | The type of cache. Valid values are:
|
Declarative Metadata Sample Definition
The following is an example of a PlatformCachePartition component.
1<?xml version="1.0" encoding="UTF-8"?>
2<PlatformCachePartition xmlns="http://soap.sforce.com/2006/04/metadata">
3 <description>Custom partition and marked as default.</description>
4 <isDefaultPartition>true</isDefaultPartition>
5 <masterLabel>myPartition</masterLabel>
6 <platformCachePartitionTypes>
7 <allocatedCapacity>10</allocatedCapacity>
8 <allocatedPurchasedCapacity>5</allocatedPurchasedCapacity>
9 <cacheType>Session</cacheType>
10 </platformCachePartitionTypes>
11 <platformCachePartitionTypes>
12 <allocatedCapacity>5</allocatedCapacity>
13 <allocatedPurchasedCapacity>5</allocatedPurchasedCapacity>
14 <cacheType>Organization</cacheType>
15 </platformCachePartitionTypes>
16</PlatformCachePartition>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>myPartition</members>
5 <name>PlatformCachePartition</name>
6 </types>
7 <version>64.0</version>
8</Package>1<members>Namespace.myPartition</members>To retrieve all cache partitions from your organization, use the wildcard character (*) as follows.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>PlatformCachePartition</name>
6 </types>
7 <version>64.0</version>
8</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.