Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Set Up and Maintain Your Salesforce Organization
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Cache Lightning Platform Data

          Cache Lightning Platform 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:

          • Setup a Platform Cache partition with Provider Free capacity.
          • 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.

          • 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.
          • Request Additional Platform Cache
            You can request additional Platform Cache space to improve the performance of your application.
          • Set Up a Platform Cache Partition with Provider Free Capacity
            Salesforce provides 3 MB of free Platform Cache capacity for security-reviewed managed packages. This is made available through a capacity type called Provider Free capacity and is automatically enabled in all Developer edition orgs.
           
          Loading
          Salesforce Help | Article