getTectonCacheObject

Updated:

Provides the ability to retrieve cached objects in the platform application's session cache.

Description

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.

Signature

tecton.sources.getTectonCacheObject(key: string, moduleId?: string): Promise<object>;

Usage

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');

Parameters

key
moduleId

Release Notes

Tecton
1.5.0

Platform Support

UUX