function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saurabh Sagar GulatiSaurabh Sagar Gulati 

Platform Cache.

We have used cookies alot for our service cloud solution in console. I would like to understand how Platform cache is different then cookies & since its for complete session then we can access it in different frames in console.

Thank in advance!!
M. TomolonisM. Tomolonis
There are two types of cache:

1. Session cache—Stores data for individual user sessions. For example, in an app that finds customers within specified territories, the calculations that run while users browse different locations on a map are reused. A session cache lives alongside a user session. The maximum life of a session is eight hours. A session cache expires when its specified time-to-live (ttlsecs value) is reached or when the session expires after eight hours, whichever comes first.

2. Org cache—Stores data that any user in an org reuses. For example, the contents of navigation bars that dynamically display menu items based on user profile are reused. Unlike a session cache, an org cache is accessible across sessions, requests, and org users and profiles. An org cache expires when its specified time-to-live (ttlsecs value) is reached.

There are several cookies that the platform uses to enhance functionality which do not contain any session information. They cannot be used to gain access or escalate privilege if altered or accessed by an attacker. The session cookie "sid" is marked as secure and is non-persistent, i.e, cookie is deleted when browser is closed.

View the following link for more info: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_platform_cache_features.htm