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

Platform Support

UUX

Changelog

The changelog provides a detailed history of new features, improvements, and bug fixes going back to Tecton 1.30.0. If the button is disabled, it indicates there have been no detectable changes since then.

Show changelog (0)