The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.
Class used to cache query results & data used in other parts of Nebula Logger
contains(String key) → BooleanManages interacting with platform cache partitions, and can be mocked during unit tests so that tests don't have to rely on the actual platform cache partitions configured in the org.
contains(String key) → BooleanManages interacting with platform cache. The provided transaction cache instance is used internally as the primary caching method, and is further augmented by using Platform Cache to provide caching that spans multiple transactions.
contains(String key) → BooleanManages any transaction-specific caching, using Map<String, Object>
get(String key) → Objectget(String key) → Objectget(String key) → ObjectgetOrganizationCache() → CacheableThe instance of Cacheable used for any organization-specific caching via Platform Cache. When Platform Cache is disabled or not available, the transaction cache is instead used.
Type
Cacheable
Description
The singleton instance of Cacheable
getSessionCache() → CacheableThe instance of Cacheable used for any session-specific caching via Platform Cache. When Platform Cache is disabled or not available, the transaction cache is instead used.
Type
Cacheable
Description
The singleton instance of Cacheable
getTransactionCache() → CacheableThe instance of Cacheable used for any transaction-specific caching. Cached data is stored internally in-memory for the duration of the transaction.
Type
Cacheable
Description
The singleton instance of Cacheable
isAvailable() → Booleanput(String key, Object value, Integer cacheTtlSeconds, Cache.Visibility cacheVisiblity, Boolean isCacheImmutable) → voidput(String key, Object value) → voidput(String key, Object value) → voidremove(String key) → voidremove(String key) → voidremove(String key) → voidInterface used to define caches that can be used to store values via different mechanisms
contains(String key) → BooleanIndicates if the specified key has already been added to the cache
####### Parameters
| Param | Description |
|---|---|
key |
The String key to check for within the cache |
####### Return
Type
Boolean
Description
The Boolean result that indicates if the specified key is contained in the cache
get(String key) → ObjectReturns the cached value for the specified key, or null if the specified key does not exist in the cache
####### Parameters
| Param | Description |
|---|---|
key |
The String key to check for within the cache |
####### Return
Type
Object
Description
The cached value, or null if no cached value is found for the specified key
put(String key, Object value) → voidAdds the provided Object value to the cache, using the specified String key
####### Parameters
| Param | Description |
|---|---|
key |
The String key to add to the cache |
value |
The Object value to cache for the specified key |
remove(String key) → voidRemoves the specified String key from the cache
####### Parameters
| Param | Description |
|---|---|
key |
The String key to remove from the cache |