-
Notifications
You must be signed in to change notification settings - Fork 464
PlatformCacheBuilderRecipes
pozil edited this page Nov 14, 2024
·
14 revisions
demonstrates how to use the Cache.CacheBuilder Interface
Implements
Cache.CacheBuilder
The doLoad method is required by the CacheBuilder interface This method needs to return an Object - and that's the key to the Cache builder interface - You must have this method return a single Object that is either calculated by this method, or returned from the Cache by the key
public Object doLoad(String key)
Name | Type | Description |
---|---|---|
key | String | String used to help generate the Cache Key |
Object
Oject that should be casted at the call location
Account[] accounts = (Account[]) Cache.Session.get(PlatformCacheBuilderRecipes.class, 'myAccounts')