TritonCacheManager
Centralizes Triton's Salesforce Platform Cache (Org cache) operations, with a test-friendly mock backend.
Overview
TritonCacheManager wraps all of Triton's Platform Cache access. In production it delegates to Cache.Org; in test context it uses an in-memory map (because platform cache put() can succeed silently while get() returns null under test). It backs transaction-ID caching (via TritonHelper and Triton.withCache()) and the deferred Flow-log buffer used by TritonFlowFlushBatch.
This is an internal utility β you rarely call it directly.
Org Cache Methods
put(String key, Object value, Integer ttl)
public static void put(String key, Object value, Integer ttl)Stores a value in Org cache under key with a time-to-live of ttl seconds.
get(String key)
public static Object get(String key)Retrieves a value from Org cache. Returns null when the key is absent.
getKeys()
public static Set<String> getKeys()Returns all keys currently in Org cache.
remove(String key)
Removes a key from Org cache.
Availability
available()
Returns true when Org cache is usable. Triton.withCache() uses this to decide whether to enable cache-backed transaction management.
Returns:
trueif Org cache is available (alwaystruein test context), otherwisefalse
Last updated