Cache Force.com Data. salesforce Salesforce Organization
Werbung
Werbung
Set Up and Maintain Your Salesforce Organization Cache Force.com Data architecture also allows us to add more database servers as needed to accommodate more users. In addition, the facility that houses our servers provides us with guaranteed bandwidth, which we can increase as needed.
Cache Force.com Data
Using the Platform Cache can enable applications to run faster because they can store reusable data in memory. Applications can quickly access this data, removing the need to duplicate calculations and requests to the database on subsequent transactions.
To use Platform Cache, first set up partitions using the Platform Cache Partition tool in Setup. Once you’ve set up partitions, you can add, access, and remove data from them using the Platform Cache Apex API.
Use Platform Cache partitions to improve the performance of your applications. Partitions allow you to distribute cache space in the way that works best for your applications. Caching data to designated partitions ensures that it’s not overwritten by other applications or less-critical data.
To access the Partition tool in Setup, enter
Platform Cache
in the
Quick Find
box, then select Platform Cache.
Use the Platform Cache Partition tool to:
•
Request trial cache.
•
Create, edit, or delete cache partitions.
•
Allocate the session cache and org cache capacities of each partition to balance performance across apps.
•
View a snapshot of the org’s current cache capacity, breakdown, and partition allocations (in KB or MB).
•
View details about each partition.
•
Make any partition the default partition.
To use Platform Cache, create at least one partition. Each partition has one session cache and one org cache segment and you can allocate separate capacity to each segment. Session cache can be used to store data for individual user sessions, and org cache is for data that any users in an org can access. You can distribute your org’s cache space across any number of partitions. Session and org cache allocations can be zero, or five or greater, and they 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 be less than or equal to the org’s overall capacity.
You can define any partition as the default partition, but you can have only one default partition. When a partition has no allocation, cache operations (such as get and put) are not invoked, and no error is returned.
Capacity calculations occur every 5 minutes by default. To make sure you’re seeing the latest capacity and allocation, click Recalculate.
IN THIS SECTION:
Request a Platform Cache Trial
To test performance improvements by using Platform Cache in your own org, you can request trial cache for your production org.
Enterprise, Unlimited, and Performance editions come with some cache, but adding more cache often provides greater performance.
When your trial request is approved, you can allocate capacity to partitions and experiment with using the cache for different scenarios. Testing the cache on a trial basis lets you make an informed decision about whether to purchase cache.
You can purchase Platform Cache space to improve the performance of your application.
SEE ALSO:
Apex Developer Guide
489
Set Up and Maintain Your Salesforce Organization Request a Platform Cache Trial
Request a Platform Cache Trial
To test performance improvements by using Platform Cache in your own org, you can request trial cache for your production org.
Enterprise, Unlimited, and Performance editions come with some cache, but adding more cache often provides greater performance.
When your trial request is approved, you can allocate capacity to partitions and experiment with using the cache for different scenarios.
Testing the cache on a trial basis lets you make an informed decision about whether to purchase cache.
Salesforce approves trial cache requests immediately and sends you an email to notify you that your Platform Cache trial is active. It can take a few minutes for you to receive the email. You receive 30 MB of trial cache space (10 MB if you have Developer Edition). If you need more trial cache space, contact Salesforce.
Note: You can make up to 10 trial cache requests, and you must wait 90 days between trials.
After you request trial cache, you receive emails at the following intervals.
At activation
You can now allocate capacity to partitions and test the trial cache in your org.
Three days before expiration
Before expiration, be sure to reconfigure your partitions to deallocate the added trial space.
At expiration
The trial cache is removed from your org.
Note:
If you haven’t deallocated enough space, Salesforce reduces your partition sizes to remove the granted trial cache space.
Developer Edition Orgs
You can request trial cache for a Developer Edition org. After you sign up for the org, request trial cache from the Platform Cache Partition tool. ISVs who are using Developer Edition orgs to create managed packages can get 10 MB of trial cache for up to two Developer Edition orgs. ISVs can contact their Salesforce representative to get trial cache in Developer Edition orgs.
Cache Reduction Algorithm
At the end of your trial period, Salesforce removes the granted trial cache space from your org. Before your trial ends, make sure that you’ve deallocated your trial cache space. You can deallocate space from the Platform Cache Partition tool by resetting partition allocations.
If you don’t deallocate the cache space, Salesforce removes the granted cache using the following process.
•
The system removes cache from the smallest non-default partition first.
Note: The size of a partition is the total allocation for the partition, which includes org-wide cache and namespace-specific cache.
•
The system then works its way through the partitions from smallest to largest in size. If multiple partitions have the same size, the system proportionally removes cache from these partitions.
•
The system reduces partitions to a minimum size of 5 MB, unless all the trial cache space can’t be removed. In this case, partitions are reduced to 0 MB.
•
The default partition (if it exists) is reduced last only if the trial cache space can’t be removed from all other partitions.
If unallocated space is present:
•
If the amount of unallocated space is greater than the amount of space that must be removed, the system removes only unallocated space.
490
Herunterladen
Werbung