Provides the ability to retrieve cached objects in the platform application's session cache.
getTectonCacheObject provides the ability to retrieve cached objects in the platform from an extension module's frontend. Data is added to the cache using setTectonCacheObject. Cache is automatically cleared upon logout, session timeout, or the window/browser tab closing.
tecton.sources.getTectonCacheObject(key: string, moduleId?: string): Promise<object>;Get from current module's cache
const userData = await tecton.sources.getTectonCacheObject('user-preferences');Get from another module's cache using the moduleId format: ExtensionName.moduleName.
// For example, retrieving data stored by "enrollmentForm" module from "processFormData" module:
tecton.sources.getTectonCacheObject('MyCacheKey', 'MyExtension.enrollmentForm');For widget modules, use the dynamic moduleId format.
// ExtensionName_moduleName_widget.ExtensionName.moduleName
tecton.sources.getTectonCacheObject('MyCacheKey', 'MyExtension_enrollmentForm_widget.MyExtension.enrollmentForm');keymoduleId