Platform Cache – Salesforce

What is a Cache? Cache is a temporary storage for frequently accessed data from a database

What is Platform Cache? It is a memory layer that stores Salesforce session and org data for later access. When you use Platform Cache, your applications can run faster because they store reusable data in memory. Applications can quickly access this data; they don’t need to duplicate calculations and requests to the database on subsequent transactions. In short, think of Platform Cache as RAM for your cloud application.

Types of Platform Cache:

  1. Org Cache: Org Cache stores org-wide data that anyone in the org can use. Org Cache is accessible across sessions, requests, and org users and profiles.
  2. Session Cache: Session Cache stores data for an individual user and is tied to that user’s session. The maximum life of a session is 8 hours.

What is Cache Partition? Cache partition allows you to allocate space to balance usage and performance across apps. Caching data to designated partitions ensures that the cache space isn’t overwritten by other apps or by less critical data. Before you can use cache space in your org, you must create partitions to define how much capacity you want for your apps. Each partition capacity is broken down between org cache and session cache.

Cache allocation by edition: Platform Cache is available to customers with Enterprise Edition orgs and above.

Enterprise Edition – 10 MB by default, Unlimited Edition – 30 MB by default, Performance Edition – 30 MB by default.