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
AbAb 

Adding and removing from cache

Hello,

I have a code like below
Cache.OrgPartition part = Cache.Org.getPartition('local.XYZToken');

I want to know how to clear the Cache and put inside the cache.

thanks 
Best Answer chosen by Ab
Deepali KulshresthaDeepali Kulshrestha
Hi Sandrine,

Please refer to these links it may be helpful to you.

https://apexcoder.com/2018/10/18/salesforce-platform-cache-partitions-using-apex/
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_cache_Org.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha