Salesforce Developer Platform Cache Key Name Format


// Salesforce - Developer - Platform Cache - Key Name Format:

Each cache key has the following format: 


Namespace is the namespace name of the org where the app is running, which can 
also be set to the special name “local”. The “local” name refers to the 
namespace of your org whether a namespace is defined in the org or not.

Partition is the name of the partition you created.

Key is the name of the key you used to store a value.

To stores a value in the org cache for the DollarToEuroRate key:

Cache.Org.put('local.CurrencyCache.DollarToEuroRate', '0.91');

When using a default partition, you can shorten the put() call to the following:

Cache.Org.put('DollarToEuroRate', '0.91');
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License