McDewey

Multi-vendor documentation library · semantic search · MCP endpoint at /mcp

Page 552

↗ View in doc context
page
552
source
finesse/v12.5/developer-guide/developer-guide.md
chunk_id
finesse::v12.5::developer-guide::developer-guide::536

Parameters Required Description Type Name Yes Unique identifier and it is the primary key to retrieve a single record from the IndexedDB. String key No An asynchronous callback function that is invoked after the data retrieval is successful or failed. Function callback No The JavaScript error message. Object -->err No The JavaScript array of objects. Object -->data saveOrUpdateData(records, callback) Creates or updates the records. The parameters passed are an array of key-value pairs. Example finesse.utilities.DesktopCache.saveOrUpdateData({ [ key: 'someKey' data: 'someData' ] }, function(err, data) { if (!err) // do something }); Parameters Required Description Type Name Yes The data to be saved or updated as an array of key-value pairs. Array records No An asynchronous callback function that is invoked after the save or updating of the record is completed (success or fail). Function callback No The JavaScript error message. Object -->err setGroup(groupName) Reduces redundancy in the data that are stored when different gadgets from the same vendor (for example, cuic) retain the same group name. Having the same group name for the gadgets which share the same data reduces the server load and improves the performance. This API must be called before any other desktop cache APIs. Note For example, consider vendor1 has two gadgets (gadget1 and gadget2), and both gadgets require the same token to be accessed from the server. Then the group name for these two gadgets can be set as vendor1. The gadget which loads first makes the server call, fetches the token, and then saves it in the desktop cache. The second gadget fetches this token from the desktop cache without making the server call. Example Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 536 Cisco Finesse JavaScript APIs Desktop Cache

Image 1 from page 552