Force.com Platform Cache. salesforce Salesforce Organization
Tangazo
Tangazo
Set Up and Maintain Your Salesforce Organization Force.com Platform Cache
Force.com Platform Cache
Define Partitions for Data Cached with Force.com Platform Cache
Partitions improve application performance by distributing cache space in the best way for your org. Cache data to designated partitions to ensure that it’s not overwritten by other applications or less-critical data. Create and manage org partitions declaratively by using the Platform Cache
Partition tool in Setup.
EDITIONS
Available in: Enterprise
Edition, Unlimited Edition
Partitions are integral to the API, and cache capability depends on them. To use the Force.com
platform cache, you need at least one partition. Each partition has one session cache and one org cache segment. Each cache segment has its own capacity and time-to-live attributes and uses an LRU algorithm.
Use the Platform Cache Partition tool to:
•
Create or remove org partitions.
•
Allocate the session cache and org cache capacities of each partition to balance performance across apps.
•
View a snapshot of all cache partitions with their current and total capacities.
•
View details about each partition.
•
Make any partition the default partition, for example to use via static methods.
First create at least one partition and allocate cache capacity to that partition’s session cache and org cache segments. You can distribute your org’s cache space across any number of partitions. Session and org cache allocations can be zero or greater than five and must be whole numbers. The sum of all partition allocations, including the default partition, equals the platform cache total allocation. The total allocated capacity of all cache segments must equal or be less than the org’s overall capacity.
You can have only one default partition, but you can define any partition as the default partition. When the capacity of the default partition is used up and is zero, you can’t create any more partitions. When a partition has no capacity left, cache operations aren’t performed, and no error is returned.
When performing cache operations within the default partition, you can omit the partition name from the key.
Note: If platform cache code is intended for a package, we recommend not using the default partition in the package. Instead, explicitly reference and package a non-default partition.
View the org’s capacity allocation on the Platform Cache Partition page. To access the Partition tool in Setup, enter
Platform Cache
in the
Quick Find
box, then select Platform Cache.
Capacity calculations occur every five minutes by default. To make sure you’re seeing the latest capacity and allocation, click Recalculate.
SEE ALSO:
Force.com Apex Code Developer’s Guide
406
Pakua
Tangazo