Skip to content

PlatformCacheBuilderRecipes

pozil edited this page Nov 14, 2024 · 14 revisions

PlatformCacheBuilderRecipes Class

demonstrates how to use the Cache.CacheBuilder Interface

Implements

Cache.CacheBuilder

Methods

doLoad(key)

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

Signature

public Object doLoad(String key)

Parameters

Name Type Description
key String String used to help generate the Cache Key

Return Type

Object

Oject that should be casted at the call location

Example

Account[] accounts = (Account[]) Cache.Session.get(PlatformCacheBuilderRecipes.class, 'myAccounts')

Clone this wiki locally