DynamicSchemaAPI - Global
The DynamicSchemaAPI provides methods to clear the various caches used by the dynamic schema implementation.
You must have the dynamic_schema_writer role to execute any of the clear() methods.
For more information on dynamic attributes, see Dynamic Schema.
DynamicSchemaAPI - clearDynamicCategoryCache()
Clears the entire dynamic category cache (DynamicCategoryCache).
DynamicCategoryCache is the internal in-memory cache of all dynamic categories. If you observe issues with stale category data, use this method to clear the cache.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicCategoryCache();
DynamicSchemaAPI - clearDynamicChoiceSetCache()
Clears the entire dynamic choice set cache (DynamicChoiceSets).
DynamicChoiceSets is the internal in-memory cache of all dynamic choice sets. If you observe issues with stale choice sets data, use this method to clear the cache.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicChoiceSetCache();
DynamicSchemaAPI - clearDynamicAttributeGroupCache()
Clears the DynamicAttributeGroups and DynamicAttributes caches.
These are internal in-memory caches that contain the attribute and attribute group data. If you observe issues with stale attribute or group data, use this method to clear the cache.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicAttributeGroupCache();
DynamicSchemaAPI - clearDynamicAttributeGroupCacheItem(String sysId)
Clears the specified dynamic attribute group from the DynamicAttributeGroup cache.
If you observe issues with stale data for a specific attribute group, use this method to clear the group's cache.
| Name | Type | Description |
|---|---|---|
| sysId | String | Sys_id of the attribute group to clear from the cache. Located in the Dynamic Attribute Group [dynamic_attribute_group] table |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicAttributeGroupCacheItem(sysId);
DynamicSchemaAPI - clearDynamicCategoryCacheItem(String sysId)
Clears a specified dynamic schema category from the DynamicCategoryCache.
DynamicCategoryCache is the internal in-memory cache of all dynamic categories. If you observe issues with stale category data for a specific category, use this method to clear that category's cache.
| Name | Type | Description |
|---|---|---|
| sysId | String | Sys_id of the category to clear from the cache. Located in the Dynamic Category [dynamic_category] table. |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicCategoryCacheItem(sysId);
DynamicSchemaAPI - clearDynamicChoiceSetItem(String sysId)
Clears a specified dynamic schema choice set from the DynamicChoiceSets cache.
DynamicChoiceSets is the internal in-memory cache for all dynamic choice sets. If you observe an issue with stale data for a specific choice set, use this method to clear that choice set's cache.
| Name | Type | Description |
|---|---|---|
| sysId | String | Sys_id of the choice set to clear from the cache. Located in the Dynamic Choice Set [dynamic_choice_set] table. |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();
api.clearDynamicChoiceSetItem(sysId);
DynamicSchemaAPI - get()
Returns the DynamicSchemaAPI singleton.
You must call this method prior to calling any other DynamicSchemaAPI method.
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| None |
The following code example shows how to call this method.
var api = DynamicSchemaAPI.get();